Merge branch 'master' of dwarves.iut-fbleau.fr:justiney/FIprojetAgile2022Groupe3B

ok
This commit is contained in:
martins 2022-10-20 11:30:21 +02:00
commit 8ec4471dbd
3 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,7 @@ public class GrilleModel extends AbstractGridInitiater{
protected void addPiece(int column, int row) {
grille[column][row] = this.playerTurn;
fireGridChanged(column, row, this.playerTurn);
this.piecePlayed++;
}
public void verifyColumn(int column) {

View File

@ -6,6 +6,7 @@ public class Constants {
public final static Color PLAYER_ONE_COLOR = new Color(252,21,21);
public final static Color PLAYER_TWO_COLOR = new Color(241,205,15);
public final static Color BACKGROUND_COLOR = new Color(31,31,31);
public final static Color EMPTY_COLOR = new Color(42,42,42);
public final static int EMPTY_PLAYER = -1;
public final static int PLAYER_ONE = 0;

View File

@ -26,7 +26,7 @@ public class Puissance4Panel extends JPanel{
GridBagLayout gbl = new GridBagLayout();
this.setLayout(gbl);
GridBagConstraints gbc = new GridBagConstraints();
this.setBackground(new Color(31,31,31));
this.setBackground(Constants.BACKGROUND_COLOR);
gbc.gridx = 0;
gbc.gridy = 0;
@ -89,10 +89,12 @@ public class Puissance4Panel extends JPanel{
reset.setBackground(new Color(255,64,64));
reset.setForeground(Color.WHITE);
reset.setFocusPainted(false);
reset.setBorder(new EmptyBorder(5,10,5,10));
menu.setBackground(new Color(255,64,64));
menu.setForeground(Color.WHITE);
menu.setFocusPainted(false);
menu.setBorder(new EmptyBorder(5,10,5,10));
}