private string DrawPiece(PieceOnBoard pieceOnBoard, int i) { string piece = " "; int pieceCount = pieceOnBoard.Count; bool firstLayer = pieceCount >= i; bool secondLayer = pieceCount >= i + 5; bool thirdLayer = pieceCount >= i + 10; if (pieceOnBoard.Player != null && firstLayer) { if (pieceOnBoard.Player.Type == ePlayerType.PlayerOne) { if (secondLayer) { if (thirdLayer) { Console.ForegroundColor = ConsoleColor.DarkCyan; } else { Console.ForegroundColor = ConsoleColor.Cyan; } } else { Console.ForegroundColor = ConsoleColor.Blue; } } else { if (secondLayer) { if (thirdLayer) { Console.ForegroundColor = ConsoleColor.DarkMagenta; } else { Console.ForegroundColor = ConsoleColor.Magenta; } } else { Console.ForegroundColor = ConsoleColor.Red; } } piece = "O"; } return(piece); }
private void AssertPiece(Player expectedPlayer, Piece expectedPiece, PieceOnBoard actualPiece) { Assert.AreEqual(expectedPlayer, actualPiece.player); Assert.AreEqual(expectedPiece, actualPiece.piece); }