-
-
Save parzibyte/0709a6598a12d656d90b23cfc0d1b27e 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 disparar(x, y, matriz) -> bool: | |
if es_mar(x, y, matriz): | |
matriz[y][x] = DISPARO_FALLADO | |
return False | |
# Si ya había disparado antes, se le cuenta como falla igualmente | |
elif matriz[y][x] == DISPARO_FALLADO or matriz[y][x] == DISPARO_ACERTADO: | |
return False | |
else: | |
matriz[y][x] = DISPARO_ACERTADO | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment