Commit b046a86a authored by Jolan RENOUX's avatar Jolan RENOUX
Browse files

maj vue8

parent 62d22a10
...@@ -19,7 +19,6 @@ public class Application { ...@@ -19,7 +19,6 @@ public class Application {
//http://172.26.82.18//api/v0 //http://172.26.82.18//api/v0
private static String url = "http://37.187.38.219/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"; private static String proxy = "srv-proxy-etu-2.iut-nantes.univ-nantes.prive";
public static boolean valider = false;
public static void main(String[] args) throws InterruptedException { public static void main(String[] args) throws InterruptedException {
...@@ -51,7 +50,7 @@ public class Application { ...@@ -51,7 +50,7 @@ public class Application {
fleet.add(new AircraftCarrier("porteavion4","D1","D6")); fleet.add(new AircraftCarrier("porteavion4","D1","D6"));
} catch (BadCoordException | CoordsBadShipException e) {e.printStackTrace();} } catch (BadCoordException | CoordsBadShipException e) {e.printStackTrace();}
while(valider){} while(pf.fc.isValider()){Thread.sleep(500);}
jaquie = new Player(pf.fc.getPseudo()); jaquie = new Player(pf.fc.getPseudo());
fleet = pf.fc.getFlotte(); fleet = pf.fc.getFlotte();
ArrayList<Game> parties = new ArrayList<Game>(); ArrayList<Game> parties = new ArrayList<Game>();
......
...@@ -25,6 +25,8 @@ import java.util.function.BiPredicate; ...@@ -25,6 +25,8 @@ import java.util.function.BiPredicate;
public class FenetreConnexion extends JFrame { public class FenetreConnexion extends JFrame {
private boolean valider = false;
private JTextField pseudo; private JTextField pseudo;
private JButton envoyepseudo; private JButton envoyepseudo;
private JComboBox pInitialise; private JComboBox pInitialise;
...@@ -231,6 +233,7 @@ public class FenetreConnexion extends JFrame { ...@@ -231,6 +233,7 @@ public class FenetreConnexion extends JFrame {
envoyepseudo.addActionListener(new ActionListener() { envoyepseudo.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
creerPartie.setEnabled(true); creerPartie.setEnabled(true);
try { try {
for (Game g : Network.listInitializedGames("http://37.187.38.219/api/v0")){ for (Game g : Network.listInitializedGames("http://37.187.38.219/api/v0")){
...@@ -292,6 +295,7 @@ public class FenetreConnexion extends JFrame { ...@@ -292,6 +295,7 @@ public class FenetreConnexion extends JFrame {
// Les getters // Les getters
public String getPseudo(){ return pseudo.getText(); } public String getPseudo(){ return pseudo.getText(); }
public boolean isValider() { return valider;}
// public Integer getGameID(){ return gameId; } // public Integer getGameID(){ return gameId; }
public NavyFleet getFlotte(){ return flotte;} public NavyFleet getFlotte(){ return flotte;}
......
...@@ -18,6 +18,7 @@ import java.awt.event.ActionListener; ...@@ -18,6 +18,7 @@ import java.awt.event.ActionListener;
import java.util.List; import java.util.List;
public class FenetreJeux extends JFrame { public class FenetreJeux extends JFrame {
private Coord coco;
//création de la classe Fenetre jeux extension de JFrame //création de la classe Fenetre jeux extension de JFrame
private JComboBox pInitialise; private JComboBox pInitialise;
//initialisation de tout les widget //initialisation de tout les widget
...@@ -111,5 +112,6 @@ public class FenetreJeux extends JFrame { ...@@ -111,5 +112,6 @@ public class FenetreJeux extends JFrame {
//qu'on ajoute au panel principale //qu'on ajoute au panel principale
} }
public Coord getCoco() {return coco;}
} }
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