Exemplo n.º 1
0
        public Maze(int rows, int columns)
        {
            this.rows    = rows;
            this.columns = columns;

            int middleRow    = this.rows % 2 == 0? this.rows / 2 : (this.rows + 1) / 2;
            int middleColumn = this.columns % 2 == 0? this.columns / 2 : (this.columns + 1) / 2;

            this.pacManPosition  = new PacManPosition(middleRow, middleColumn);
            this.pacManDirection = PacManDirections.Up;
        }
Exemplo n.º 2
0
 public void PacManLeft()
 {
     pacManDirection = PacManDirections.Left;
 }
Exemplo n.º 3
0
 public void PacManUp()
 {
     pacManDirection = PacManDirections.Up;
 }
Exemplo n.º 4
0
 public void PacManDown()
 {
     pacManDirection = PacManDirections.Down;
 }
Exemplo n.º 5
0
 public void PacManRight()
 {
     pacManDirection = PacManDirections.Right;
 }