Commit 88d79ec1 authored by Jolan RENOUX's avatar Jolan RENOUX
Browse files

maj app2.0

parent b290f892
......@@ -18,7 +18,15 @@ import java.util.ArrayList;
* @version 1.0
*/
public class Application {
//http://37.187.38.219/api/v0
//http://172.26.82.18//api/v0
private static String url = "http://37.187.38.219/api/v0";
private static String proxy = "srv-proxy-etu-2.iut-nantes.univ-nantes.prive";
public static void main(String[] args) throws InterruptedException {
FenetreConnexion fc = new FenetreConnexion("Connexion au serveur et aux parties");
// http://172.26.82.18//api/v0 (URL à changer si ca ne marche pas)
......@@ -33,7 +41,7 @@ public class Application {
//TODO IHM changer le nom de jaquie
Player jaquie = new Player("Jaquie");
try {
Network.suscribeNewPlayer("http://37.187.38.219/api/v0/", jaquie);
Network.suscribeNewPlayer(url, jaquie);
} catch (UnirestException e) {
e.printStackTrace();
}
......@@ -57,7 +65,7 @@ public class Application {
Game newGame = new Game((int) Math.random());
} catch (BadIdException e) {e.printStackTrace();}
try {
Network.initNewGame("http://37.187.38.219/api/v0/",jaquie,fleet);
Network.initNewGame(url,jaquie,fleet);
} catch (UnirestException e) {e.printStackTrace();} catch (UncompleteFleetException e) {e.printStackTrace();} catch (BadCoordException 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