Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 4fbac6e8 rédigé par E194212A's avatar E194212A
Parcourir les fichiers

Remise à jour vue

parent 80cdd73b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" project-jdk-name="14" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_15" project-jdk-name="15 (2)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -81,45 +81,33 @@ public class FenetreConnexion extends JFrame { ...@@ -81,45 +81,33 @@ public class FenetreConnexion extends JFrame {
return (Integer) ((DefaultListModel)listePartie.getModel()).get(listeStringPartie.getSelectedIndex()); return (Integer) ((DefaultListModel)listePartie.getModel()).get(listeStringPartie.getSelectedIndex());
} }
/* public void getWaitingServer() throws CnNetworkException, CnBadIdException { /* public void getWaitingServer() throws BadIdException {
if(!((DefaultListModel)listePartie.getModel()).isEmpty()) { if(!((DefaultListModel)listePartie.getModel()).isEmpty()) {
((DefaultListModel) listePartie.getModel()).removeAllElements(); ((DefaultListModel) listePartie.getModel()).removeAllElements();
((DefaultListModel)listeStringPartie.getModel()).removeAllElements(); ((DefaultListModel)listeStringPartie.getModel()).removeAllElements();
} }
((DefaultListModel)listePartie.getModel()).addAll(client.waitingGames()); ((DefaultListModel)listePartie.getModel()).addAll(Network.waitingGames());
for (int i = 0;i<((DefaultListModel)listePartie.getModel()).getSize();i++){ for (int i = 0;i<((DefaultListModel)listePartie.getModel()).getSize();i++){
((DefaultListModel)listeStringPartie.getModel()).addElement("Partie n° "+ ((DefaultListModel)listePartie.getModel()).getElementAt(i)+" créé par "+client.consultGame((Integer) ((DefaultListModel)listePartie.getModel()).getElementAt(i)).creator()); ((DefaultListModel)listeStringPartie.getModel()).addElement("Partie n° "+ ((DefaultListModel)listePartie.getModel()).getElementAt(i)+" créé par "+ Network.getInfo((Integer)
((DefaultListModel)listePartie.getModel()).getElementAt(i)).creator());
} }
} } */
*/
// Les getters
public boolean getStatutActualiser(){
return boutonActualiser.isEnabled(); // Les getters
} public boolean getStatutActualiser(){ return boutonActualiser.isEnabled(); }
public String getLogin(){ public String getLogin(){ return textLogin.getText(); }
return textLogin.getText();
}
public Integer getGameID(){ public Integer getGameID(){ return gameId; }
return gameId;
}
public Boolean getCreerpartie() { public Boolean getCreerpartie() { return creerPartie; }
return creerPartie;
}
// Les setters // Les setters
public void setGameID(Integer i){ public void setGameID(Integer i){ gameId = i; }
gameId = i;
}
public void setCreerpartie(Boolean bool) { public void setCreerpartie(Boolean bool) { creerPartie = bool; }
creerPartie = bool;
}
// public void playerConnexion(Joueur pl) throws CnBadLoginException, CnNetworkException { // public void playerConnexion(Joueur pl) throws CnBadLoginException, CnNetworkException {
// player = pl; // player = pl;
...@@ -128,17 +116,11 @@ public class FenetreConnexion extends JFrame { ...@@ -128,17 +116,11 @@ public class FenetreConnexion extends JFrame {
// Autres fonctions // Autres fonctions
public void visibleCreer(){ public void visibleCreer(){ boutonCreer.setEnabled(true); }
boutonCreer.setEnabled(true);
}
public void visibleRejoidre(){ public void visibleRejoidre(){ boutonRejoindre.setEnabled(true); }
boutonRejoindre.setEnabled(true);
}
public void visibleActualiser(){ public void visibleActualiser(){ boutonActualiser.setEnabled(true); }
boutonActualiser.setEnabled(true);
}
// public boolean rejoindre(Integer id, Joueur pl) throws CnNetworkException, CnBadLoginException, CnBadIdException { // public boolean rejoindre(Integer id, Joueur pl) throws CnNetworkException, CnBadLoginException, CnBadIdException {
// return client.joinGame(id,pl); // return client.joinGame(id,pl);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter