/// <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); } } }
/// <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); } } } }