Commit 92ece3c1 authored by Jolan RENOUX's avatar Jolan RENOUX
Browse files

maj vue4

parent 23744b35
...@@ -128,13 +128,20 @@ public class FenetreConnexion extends JFrame { ...@@ -128,13 +128,20 @@ public class FenetreConnexion extends JFrame {
bouttons[i].getButton().setEnabled(false); bouttons[i].getButton().setEnabled(false);
} }
} }
} else { } else if(flotte.add(c.TestCreation())==-2) {
JOptionPane.showMessageDialog(null, "Flotte déja pleine"); JOptionPane.showMessageDialog(null, "Flotte déja pleine");
for(int i=0;i<100;i++){ for(int i=0;i<100;i++){
if(bouttons[i].getString().equals(co[0])){ if(bouttons[i].getString().equals(co[0])){
bouttons[i].getButton().setBackground(Color.WHITE); bouttons[i].getButton().setBackground(Color.WHITE);
} }
} }
}else{
JOptionPane.showMessageDialog(null, "les bateux ne doivent pas se chevaucher");
for(int i=0;i<100;i++){
if(bouttons[i].getString().equals(co[0])){
bouttons[i].getButton().setBackground(Color.WHITE);
}
}
} }
} else { } else {
for(int i=0;i<100;i++){ for(int i=0;i<100;i++){
...@@ -209,6 +216,8 @@ public class FenetreConnexion extends JFrame { ...@@ -209,6 +216,8 @@ public class FenetreConnexion extends JFrame {
} }
}); });
creerPartie.addActionListener(new ActionListener() { creerPartie.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
......
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