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