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
/** | |
* Draw the player | |
*/ | |
public void drawPlayer(Graphics2D g2d, Dimension playerSize) { | |
//Get the players position in terms of cell co-ords | |
int playerxmin = (teddy.getxPos() + teddy.getChangex()) / cellWidth; | |
int playerymin = (teddy.getyPos() + teddy.getChangey()) / cellHeight; | |
//Get the max player x and y | |
int playerxmax = (playerxmin + (int)teddy.getSize().getWidth()) / cellWidth; |
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
/** | |
* The Board | |
* | |
* Need to generate a maze | |
*/ | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.GridLayout; |
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.util.*; | |
class FormWords { | |
private String joinLetters(ArrayList<String> letters) { | |
String word = ""; | |
for (String letter : letters) { | |
word += letter; | |
} | |
return word; |
NewerOlder