Commit 869ae2cf authored by Jolan RENOUX's avatar Jolan RENOUX
Browse files

maj vue10

parent 6adb4731
...@@ -27,6 +27,9 @@ import java.util.function.BiPredicate; ...@@ -27,6 +27,9 @@ import java.util.function.BiPredicate;
public class FenetreConnexion extends JFrame { public class FenetreConnexion extends JFrame {
private boolean valider = false; private boolean valider = false;
private Game jeu;
private JTextField pseudo; private JTextField pseudo;
private JButton envoyepseudo; private JButton envoyepseudo;
private JComboBox pInitialise; private JComboBox pInitialise;
...@@ -223,18 +226,16 @@ public class FenetreConnexion extends JFrame { ...@@ -223,18 +226,16 @@ public class FenetreConnexion extends JFrame {
rejoindre.addActionListener(e -> { rejoindre.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
}
}); });
creerPartie.addActionListener(new ActionListener() { creerPartie.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
try {
for (Game g : Network.listInitializedGames("http://37.187.38.219/api/v0")){
pInitialise.addItem(g);
}
} catch (UnirestException unirestException) {unirestException.printStackTrace(); }
} }
...@@ -301,6 +302,7 @@ public class FenetreConnexion extends JFrame { ...@@ -301,6 +302,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 boolean isValider() { return valider;}
public Game getJeu() { return jeu;}
// public Integer getGameID(){ return gameId; } // public Integer getGameID(){ return gameId; }
public NavyFleet getFlotte(){ return flotte;} public NavyFleet getFlotte(){ return flotte;}
......
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