-
-
Save parzibyte/b4d5a158487dfc7834970535cf066d36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def imprimir_tablero(tablero): | |
# Imprime números de columnas | |
print("|", end="") | |
for f in range(1, len(tablero[0]) + 1): | |
print(f, end="|") | |
print("") | |
# Datos | |
for fila in tablero: | |
print("|", end="") | |
for valor in fila: | |
color_terminal = Fore.GREEN | |
if valor == COLOR_2: | |
color_terminal = Fore.RED | |
print(color_terminal + valor, end="") | |
print(Style.RESET_ALL, end="") | |
print("|", end="") | |
print("") | |
# Pie | |
print("+", end="") | |
for f in range(1, len(tablero[0]) + 1): | |
print("-", end="+") | |
print("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment