/**
* function name : printBoard
* @param board
* Inside the function
* - Print the board
*
*/
public static void printBoard(char[][] board){
for(int row =0; row<board.length; row++){
System.out.println("\t"); // add a tab of space before each row
for(int col=0; col<board[row].length; col++){
System.out.print(board[row][col] + " ");
}
System.out.println();
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter