public void Draw(string playerName) { Console.WriteLine(); Console.WriteLine($"{playerName} board:"); for (int i = -1; i < _board.Board.GetLength(0); i++) { for (int j = -1; j < _board.Board.GetLength(1); j++) { if (IsStartingPoint(i, j)) { Console.Write("\t"); } if (IsFirstColumn(i, j)) { Console.Write(CoordinateConverter.ConvertBoardRowToUserInputRow(i) + "\t"); } if (IsFirstRow(i, j)) { Console.Write($" {j + 1}\t"); } else if (j != -1 && i != -1) { Console.Write(DrawField(i, j)); } } Console.WriteLine(); } }
public void CanConvertBoardRowNumberToLettersRow(int rowNumber, string expectedLettersRow) { string result = CoordinateConverter.ConvertBoardRowToUserInputRow(rowNumber); Assert.AreEqual(expectedLettersRow, result); }