Commit 94673d99 authored by Jolan RENOUX's avatar Jolan RENOUX
Browse files

maj appp4

parent a350079d
...@@ -51,8 +51,9 @@ public class Application { ...@@ -51,8 +51,9 @@ public class Application {
*/ */
while(pf.fc.isValider()==false){Thread.sleep(500);} while(pf.fc.isValider()){Thread.sleep(500);}
jaquie = new Player(pf.fc.getPseudo()); jaquie = new Player(pf.fc.getPseudo());
System.out.println(jaquie.getName());
fleet = pf.fc.getFlotte(); fleet = pf.fc.getFlotte();
//TODO IHM : combobox avec cette liste //TODO IHM : combobox avec cette liste
...@@ -63,7 +64,10 @@ public class Application { ...@@ -63,7 +64,10 @@ public class Application {
System.out.println("REJOINDRE PARTIE"); System.out.println("REJOINDRE PARTIE");
try { try {
jeu = pf.fc.getJeu(); jeu = pf.fc.getJeu();
Network.joinGame(url,pf.fc.getJeu(),jaquie,pf.fc.getFlotte()); System.out.println(jeu);
boolean bool = Network.joinGame(url,jeu,jaquie,fleet);
System.out.println(bool);
System.out.println("pupute");
} catch (UnirestException | UncompleteFleetException | BadCoordException e) { e.printStackTrace();} } catch (UnirestException | UncompleteFleetException | BadCoordException e) { e.printStackTrace();}
System.out.println("puuuuuute"); System.out.println("puuuuuute");
done = false; done = false;
...@@ -71,7 +75,7 @@ public class Application { ...@@ -71,7 +75,7 @@ public class Application {
//creer partie //creer partie
System.out.println("CREER PARTIE"); System.out.println("CREER PARTIE");
try { try {
jeu = Network.initNewGame(url,jaquie,pf.fc.getFlotte()); jeu = Network.initNewGame(url,jaquie,fleet);
} }
catch (UnirestException | BadCoordException | UncompleteFleetException e) {e.printStackTrace();} catch (UnirestException | BadCoordException | UncompleteFleetException e) {e.printStackTrace();}
System.out.println("puuuuuute2"); System.out.println("puuuuuute2");
...@@ -102,6 +106,7 @@ public class Application { ...@@ -102,6 +106,7 @@ public class Application {
int info = 0; int info = 0;
while(partie_bool){ while(partie_bool){
try { try {
System.out.println(jeu);
info = Network.getInfo("http://172.26.82.18//api/v0",jeu,jaquie); info = Network.getInfo("http://172.26.82.18//api/v0",jeu,jaquie);
System.out.println(info); System.out.println(info);
} catch (UnirestException | BadIdException e) { e.printStackTrace(); } } catch (UnirestException | BadIdException e) { e.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