You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sugestão de melhoria:
Ao invés de fazer if lets aninhados, voces poderiam utilizar eles na mesma linha, deixaria o código mai limpo e fácil de tratar. Ex:
if let input = readLine(), let aux = Int(input){
teste.tamagotchi.medicar(aux)
teste.tamagotchi.estado()
status()
}else{
if input == "cp"{
comprar()
}else if input == "v"{
menuP()
}
}
}
The text was updated successfully, but these errors were encountered:
Arquivo:
main
Função:
Farmacia()
Comprar()
Sugestão de melhoria:
Ao invés de fazer if lets aninhados, voces poderiam utilizar eles na mesma linha, deixaria o código mai limpo e fácil de tratar. Ex:
if let input = readLine(), let aux = Int(input){
teste.tamagotchi.medicar(aux)
teste.tamagotchi.estado()
status()
}else{
if input == "cp"{
comprar()
}else if input == "v"{
menuP()
}
}
}
The text was updated successfully, but these errors were encountered: