Skip to content
Snippets Groups Projects
Commit 466f1561 authored by Kellian Mirey's avatar Kellian Mirey
Browse files

Patch main attack loop

parent 9a424fcf
No related branches found
No related tags found
No related merge requests found
......@@ -45,9 +45,10 @@ class Main {
while (!attacksNames.contains(input.getInput())) {
if (!attacksNames.contains(input.getInput())){
System.out.println("WARNING ! : Choose an attack in the list");
input.setInput(in.nextLine());
}
}
String attack = attacksNames.get(attacksNames.indexOf(input.getInput()));
String attack = attacksNames.get(attacksNames.indexOf(input.getInput())).toUpperCase();
JoueurEnnemi.damage(Attack.valueOf(attack).getDamage());
System.out.println(JoueurEnnemi.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment