This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.*; | |
import org.junit.Test; | |
import org.junit.Before; | |
import org.junit.Ignore; | |
import java.util.ArrayList; | |
public class LinkedListTest { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void removeNode(struct node** headRef, struct node* del) | |
{ | |
if (del == NULL || *headRef == NULL) | |
{ | |
return; | |
} | |
if (*headRef == del) | |
{ | |
*headRef = del->next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Point; | |
import java.util.Queue; | |
import java.util.ArrayList; | |
import java.util.LinkedList; | |
/** | |
* In order to help learn course concepts, I worked on this homework with Chris Lewis, | |
* discussed homework topics and issues with Chris Lewis | |
* | |
* A class to represent the second enemy | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void generatePath(Point position) | |
{ | |
if (position == playerPosition) | |
{ | |
queue.add(playerPosition); | |
} | |
else | |
{ | |
Point next = findNextTile(position); | |
if (next != null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.KeyEvent; | |
import java.util.Random; | |
import java.awt.Point; | |
import javax.swing.JOptionPane; | |
import java.util.Timer; | |
import java.util.TimerTask; | |
/** | |
* In order to help learn course concepts, I worked on this homework with Chris Lewis, | |
* discussed homework topics and issues with Chris Lewis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.KeyEvent; | |
import java.util.Random; | |
import java.awt.Point; | |
import javax.swing.JOptionPane; | |
import java.util.Timer; | |
import java.util.TimerTask; | |
/** | |
* In order to help learn course concepts, I worked on this homework with Chris Lewis, | |
* discussed homework topics and issues with Chris Lewis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.*; | |
import javax.swing.*; | |
import java.awt.Graphics; | |
public class DisplayPanel extends JPanel | |
{ | |
private Tile[][] tiles; | |
private Creature[] creatures; | |
private Dungeon dungeon; | |
private Player player; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.*; | |
import javax.swing.*; | |
import java.awt.Graphics; | |
public class DisplayPanel extends JPanel | |
{ | |
private Tile[][] tiles; | |
private Creature[] creatures; | |
private Dungeon dungeon; | |
private Player player; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.*; | |
import javax.swing.*; | |
import java.awt.Graphics; | |
public class DisplayPanel extends JPanel | |
{ | |
private Tile[][] tiles; | |
private Creature[] creatures; | |
private Dungeon dungeon; | |
private Player player; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char* reverseString(char* string) | |
{ | |
int i, j; | |
char reversed[sizeof(string)]; | |
j = strlen(string); | |
for (i = strlen(string); i >= 0; i--) | |
{ | |
reversed[j - i] = string[i]; | |
} |