-
-
Save parzibyte/94eaea063f1130820d43d11d85db60f0 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 solicitar_movimiento(movimientos): | |
while True: | |
print("Movimientos que puede aprender el pokémon: ") | |
for indice, movimiento in enumerate(movimientos): | |
print(f"{indice} - {movimiento}") | |
indice_movimiento = int(input("Seleccione un ataque a ejecutar: ")) | |
if indice_movimiento < 0 or indice_movimiento > len(movimientos) - 1: | |
print("Número inválido") | |
continue | |
movimiento = movimientos[indice_movimiento] | |
print(f"El ataque seleccionado es: {movimiento}") | |
poder_ataque = get_move(normalizar_nombre(movimiento)) | |
if poder_ataque > 0: | |
return poder_ataque | |
else: | |
print("El ataque tiene un poder de 0. Seleccione otro movimiento") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment