Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 21, 2021 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/20d1dd99d18b34407efcf5ec1507d92f to your computer and use it in GitHub Desktop.
Save parzibyte/20d1dd99d18b34407efcf5ec1507d92f to your computer and use it in GitHub Desktop.
// Imprime el tablero de juego
static void imprimirTablero(char[][] tablero) {
System.out.print("\n");
int y;
int x;
// Imprimir encabezado
System.out.print("| ");
for (x = 0; x < COLUMNAS; x++) {
System.out.printf("|%d", x + 1);
}
System.out.print("|\n");
for (y = 0; y < FILAS; y++) {
System.out.printf("|%d", y + 1);
for (x = 0; x < COLUMNAS; x++) {
System.out.printf("|%c", tablero[y][x]);
}
System.out.print("|\n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment