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.


Variable Index

 o colors
 o power
 o x
 o y

Constructor Index

 o Monster(int, int)
Creates a new monster in the given coordination.

Method Index

 o makeMove(int[][], int)
Makes a move on the board given.
 o toString()

Variables

 o x
 public int x
 o y
 public int y
 o power
 public int power
 o colors
 public static Color colors[]

Constructors

 o Monster
 public Monster(int x,
                int y)
Creates a new monster in the given coordination.

Parameters:
x - The X coord
y - The y coord

Methods

 o toString
 public String toString()
Overrides:
toString in class Object
 o 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