changement affichage victoire Puissance3
This commit is contained in:
parent
a4fb1ee2c6
commit
58f3a9b722
@ -7,9 +7,7 @@ import fr.iutfbleau.projetAgile.Menu.View.Menu;
|
||||
|
||||
public class ObservateurAccueil implements ActionListener{
|
||||
private Component comp;
|
||||
public ObservateurAccueil(Component parent){
|
||||
this.comp=parent;
|
||||
}
|
||||
public ObservateurAccueil(Component parent){}
|
||||
public void actionPerformed(ActionEvent evenement){
|
||||
int confirmation = JOptionPane.showConfirmDialog(this.comp, "Etes-vous sûr de vouloir retourner au menu ?", "Menu", JOptionPane.YES_NO_OPTION);
|
||||
if(confirmation == 1) return;
|
||||
|
@ -231,7 +231,17 @@ public class Puissance4Panel extends JPanel{
|
||||
}
|
||||
|
||||
public void playerWin(int player){
|
||||
JOptionPane.showMessageDialog(this, "Le joueur "+String.valueOf(player)+" a gagné");
|
||||
switch(player){
|
||||
case 1:
|
||||
JOptionPane.showMessageDialog(this, "Le joueur "+this.playerOneName+" a gagné");
|
||||
break;
|
||||
case 2:
|
||||
JOptionPane.showMessageDialog(this, "Le joueur "+this.playerTwoName+" a gagné");
|
||||
break;
|
||||
case 3:
|
||||
JOptionPane.showMessageDialog(this, "Le joueur "+this.playerThreeName+" a gagné");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user