コード例 #1
0
ファイル: Monster.cs プロジェクト: davidbedok/oeprog3
 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;
 }
コード例 #2
0
ファイル: Monster.cs プロジェクト: davidbedok/oeprog3
 protected static void printMonster(MazeField position, ConsoleColor color, char shape)
 {
     Console.SetCursorPosition(position.Column, position.Row);
     Console.ForegroundColor = color;
     Console.Write(shape);
 }
コード例 #3
0
ファイル: Maze.cs プロジェクト: davidbedok/oeprog3
 public void reservePosition(MazeField field)
 {
     this.fields[field.Row, field.Column] = true;
 }
コード例 #4
0
ファイル: Maze.cs プロジェクト: davidbedok/oeprog3
 public void releasePosition(MazeField field)
 {
     this.fields[field.Row, field.Column] = false;
 }