Class Monster
java.lang.Object
|
+----Monster
- public class Monster
- extends Object
- implements Serializable
Holds one monster and make it move with a random generator number.
-
colors
-
-
power
-
-
x
-
-
y
-
-
Monster(int, int)
- Creates a new monster in the given coordination.
-
makeMove(int[][], int)
- Makes a move on the board given.
-
toString()
-
x
public int x
y
public int y
power
public int power
colors
public static Color colors[]
Monster
public Monster(int x,
int y)
- Creates a new monster in the given coordination.
- Parameters:
- x - The X coord
- y - The y coord
toString
public String toString()
- Overrides:
- toString in class Object
makeMove
public void makeMove(int matrix[][],
int seqNum)
- Makes a move on the board given. Tries to move according to
the random number generator.
- Parameters:
- matrix - the matrix holding the board
- seqNum - adds randomness to different monsters called with
different seqnum's