Beispiel #1
0
 public ICell[,] GeneratePlayField(Labyrinth.Common.Contracts.IRandomNumberGenerator rand)
 {
     for (int i = 0; i < this.cells.GetLength(0); i++)
     {
         for (int j = 0; j < this.cells.GetLength(1); j++)
         {
             this.cells[i, j] = new Cell(new Position(i, j), '-');
         }
     }
     return(this.cells);
 }
        public ICell[,] GeneratePlayField(Labyrinth.Common.Contracts.IRandomNumberGenerator rand)
        {
            for (int i = 0; i < this.cells.GetLength(0); i++)
            {
                for (int j = 0; j < this.cells.GetLength(1); j++)
                {
                    this.cells[i, j] = new Cell(new Position(i, j), Constants.StandardGameCellEmptyValue);
                }
            }

            this.cells[this.playerPosition.Row, this.playerPosition.Column].ValueChar = Constants.StandardGamePlayerChar;
            return(this.cells);
        }