public static void printBoard(Board board, bool[,] possiblePositions) { for (int i = 0; i < board.Lines; i++) { Console.Write(" " + (8 - i) + " "); ConsoleColor originalBackground = Console.BackgroundColor; ConsoleColor alteredBackground = ConsoleColor.DarkRed; for (int j = 0; j < board.Rows; j++) { if (possiblePositions[i, j]) { Console.BackgroundColor = alteredBackground; } else { Console.BackgroundColor = originalBackground; } printPiece(board.piece(i, j)); } Console.BackgroundColor = originalBackground; Console.WriteLine(); } Console.WriteLine(" a b c d e f g h "); }
public static void PrintTray(Board board, bool[,] possiblePositions) { ConsoleColor originalBackground = Console.BackgroundColor; ConsoleColor modifiedBackground = ConsoleColor.DarkGray; for (int i = 0; i < board.Lines; i++) { Console.Write(8 - i + " "); for (int j = 0; j < board.Columns; j++) { if (possiblePositions[i, j]) { Console.BackgroundColor = modifiedBackground; } else { Console.BackgroundColor = originalBackground; } PiecePrint(board.piece(i, j)); Console.BackgroundColor = originalBackground; } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); Console.BackgroundColor = originalBackground; }
public static void printscreen(Board board, bool[,] possiblemoves) { ConsoleColor originalcolor = Console.BackgroundColor; ConsoleColor newcolor = ConsoleColor.DarkGray; for (int i = 0; i < board.lines; i++) { Console.Write(8 - i + " "); for (int j = 0; j < board.columns; j++) { if (possiblemoves[i, j]) { Console.BackgroundColor = newcolor; } else { Console.BackgroundColor = originalcolor; } printPiece(board.piece(i, j)); Console.BackgroundColor = originalcolor; } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); Console.BackgroundColor = originalcolor; }
public static void PrintBoardGame(Board board, bool[,] possiblePositions) { ConsoleColor actualBackground = Console.BackgroundColor; ConsoleColor changeBackground = ConsoleColor.DarkGray; for (int i = 0; i < board.Rows; i++) { Console.Write(8 - i + " "); for (int j = 0; j < board.Columns; j++) { if (possiblePositions[i, j]) { Console.BackgroundColor = changeBackground; } else { Console.BackgroundColor = actualBackground; } PrintPiece(board.piece(i, j)); Console.BackgroundColor = actualBackground; } Console.WriteLine(); } Console.WriteLine(" A B C D E F G H"); Console.BackgroundColor = actualBackground; }
public static void PrintTray(Board board) { for (int i = 0; i < board.Lines; i++) { Console.Write(8 - i + " "); for (int j = 0; j < board.Columns; j++) { PiecePrint(board.piece(i, j)); } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); }
public static void printscreen(Board board) { for (int i = 0; i < board.lines; i++) { Console.Write(8 - i + " "); for (int j = 0; j < board.columns; j++) { printPiece(board.piece(i, j)); } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); }
public static void PrintBoardGame(Board board) { for (int i = 0; i < board.Rows; i++) { Console.Write(8 - i + " "); for (int j = 0; j < board.Columns; j++) { PrintPiece(board.piece(i, j)); } Console.WriteLine(); } Console.WriteLine(" A B C D E F G H"); }
public static void printBoard(Board board) { for (int i = 0; i < board.Lines; i++) { Console.Write(" " + (8 - i) + " "); for (int j = 0; j < board.Rows; j++) { printPiece(board.piece(i, j)); } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h "); }