Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 protected static void printMonster(MazeField position, ConsoleColor color, char shape)
 {
     Console.SetCursorPosition(position.Column, position.Row);
     Console.ForegroundColor = color;
     Console.Write(shape);
 }
Ejemplo n.º 3
0
 public void reservePosition(MazeField field)
 {
     this.fields[field.Row, field.Column] = true;
 }
Ejemplo n.º 4
0
 public void releasePosition(MazeField field)
 {
     this.fields[field.Row, field.Column] = false;
 }