Commit cad96cfc authored by Tristan MAISONNEUVE's avatar Tristan MAISONNEUVE
Browse files

Merge remote-tracking branch 'origin/master'

parents 412ed373 a1973083
......@@ -31,7 +31,7 @@ public class Application {
*/
PremiereFenetre pf = new PremiereFenetre();
Network.setProxy("srv-proxy-etu-2.iut-nantes.univ-nantes.prive",3128);
Network.setProxy(proxy,3128);
Network.enableProxy(true);
//TODO IHM changer le nom de jaquie
......@@ -50,6 +50,10 @@ public class Application {
fleet.add(new AircraftCarrier("porteavion3","C1","C6"));
fleet.add(new AircraftCarrier("porteavion4","D1","D6"));
} catch (BadCoordException e) {e.printStackTrace();} catch (CoordsBadShipException e) {e.printStackTrace();}
while(fleet.isBelgianConfiguration() || fleet.isFrenchConfiguration()){
}
ArrayList<Game> parties = new ArrayList<Game>();
......@@ -57,12 +61,19 @@ public class Application {
//TODO Init game ou rejoindre
try {
Game newGame = new Game((int) Math.random());
} catch (BadIdException e) {e.printStackTrace();}
//new game
try {
Network.initNewGame(url,jaquie,fleet);
} catch (UnirestException e) {e.printStackTrace();} catch (UncompleteFleetException e) {e.printStackTrace();} catch (BadCoordException e) {e.printStackTrace();}
} //rejoindre game
catch (UnirestException | BadCoordException | UncompleteFleetException e) {
e.printStackTrace();
}
/*
try {
Network.joinGame(url,LISTENER_GAME_CHOISI_DANS_LA_LISTE,jaquie,fleet);
} catch (UnirestException | UncompleteFleetException | BadCoordException e) {e.printStackTrace();}
*/
/*
1 si la partie est correctement initiée par le joueur courant ;
......
package controleur;
public class BlablaListener {
}
......@@ -10,7 +10,6 @@ import modele.info1.ships.Coord;
import modele.info1.ships.CreationB;
import modele.info1.ships.NavyFleet;
import javax.naming.Name;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
......
Supports Markdown
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