示例#1
0
 /// <summary>
 /// The method fills the matrix with symbols forming square shape
 /// </summary>
 public override void FillMatrix(IRandomCharProvider randomCharProvider)
 {
     for (int row = 0; row < this.Matrix.GetLength(0); row++)
     {
         for (int col = 0; col < this.Matrix.GetLength(1); col++)
         {
             this.Matrix[row, col] = randomCharProvider.GetRandomSymbol(ChanceOfObstacle);
         }
     }
 }
示例#2
0
        /// <summary>
        /// The method fills the matrix with symbols forming diamond shape
        /// </summary>
        public override void FillMatrix(IRandomCharProvider randomCharProvider)
        {
            for (int row = 0; row < this.Matrix.GetLength(0); row++)
            {
                for (int col = 0; col < this.Matrix.GetLength(1); col++)
                {
                    bool isBlankSpace = this.IsBlankSpaceSign(row, col);

                    if (isBlankSpace)
                    {
                        this.Matrix[row, col] = (char)Symbol.BlankSpace;
                    }
                    else
                    {
                        this.Matrix[row, col] = randomCharProvider.GetRandomSymbol(ChanceOfObstacle);
                    }
                }
            }
        }
 public static void ConsoleRendererClassInicialize(TestContext testContext)
 {
     randomCharProvider = new RandomCharProvider();
     coordinates        = new Coordinate(DefaultRowCoordinate, DefaultColCoordinate);
 }
示例#4
0
 /// <summary>
 /// Creates the char matrix, specific for the different types of labyrinth
 /// </summary>
 public abstract void FillMatrix(IRandomCharProvider randomCharProvider);