Commit 8e1926b3 authored by Jocelyn MASSEROT's avatar Jocelyn MASSEROT
Browse files

Merge remote-tracking branch 'origin/master' into master

parents 1e95be5b 4911e329
......@@ -21,31 +21,35 @@ public class ListenerMouseJouer implements MouseListener {
try {
String coordonnee = ((JPanelCoords)e.getSource()).getCoord2();
System.out.println(coordonnee);
ICoord lacordo = new Coord(coordonnee);
System.out.println(lacordo);
System.out.println(f1.getGame());
System.out.println(f1.getPlayerVues());
boolean partieencours = true;
int networkrez = Network.playOneTurn("http://37.187.38.219/api/v0", f1.getGame(), f1.getPlayerVues(),lacordo);
switch (networkrez){
case -10:
f1.montour(false);
break;
case 0:
f1.result("Raté !");
break;
case 1:
f1.result("Touché !");
f1.InitialisePlateauAdverse2(((JPanelCoords)e.getSource()).getCoord2());
break;
case 10:
f1.result("Touché coulé !");
break;
case 100:
f1.MessageWin();
while(partieencours){
switch (networkrez){
case -10:
f1.montour(false);
break;
case 0:
f1.result("Raté !");
break;
case 1:
f1.result("Touché !");
f1.InitialisePlateauAdverse2(((JPanelCoords)e.getSource()).getCoord2());
break;
case 10:
f1.result("Touché coulé !");
break;
case 100:
f1.MessageWin();
break;
default:
partieencours =false;
}
}
} catch (BadCoordException | UnirestException badCoordException) {
badCoordException.printStackTrace();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment