Exemple #1
0
 public Monster(Maze maze, ConsoleColor color, int minSpeed, int maxSpeed, char shape, int hidePercent)
 {
     this.maze = maze;
     this.rand = this.maze.getRandom();
     this.color = color;
     this.minSpeed = minSpeed;
     this.maxSpeed = maxSpeed;
     this.shape = shape;
     this.hidePercent = hidePercent;
     this.hide = false;
     this.position = this.maze.getRandomPosition();
     this.lastDirection = Direction.UP;
 }
Exemple #2
0
 protected static void printMonster(MazeField position, ConsoleColor color, char shape)
 {
     Console.SetCursorPosition(position.Column, position.Row);
     Console.ForegroundColor = color;
     Console.Write(shape);
 }
Exemple #3
0
 public void reservePosition(MazeField field)
 {
     this.fields[field.Row, field.Column] = true;
 }
Exemple #4
0
 public void releasePosition(MazeField field)
 {
     this.fields[field.Row, field.Column] = false;
 }