Fonction inutiles

This commit is contained in:
Justine Yannis 2022-10-13 11:05:39 +02:00
parent a6148c3ff9
commit c23300e474

View File

@ -7,24 +7,12 @@ import java.awt.*;
public class Grille extends JPanel {
private Pion grille[][];
private int playerTurn = Utils.PLAYER_ONE;
public Grille() {
super();
this.init();
}
// public void drawPlayerPlay(int column, int player) {
// for (int row = Utils.ROW_COUNT - 1; row >= 0; row--) {
// Pion p = grille[column][row];
// if (p.getBackground() != Utils.PLAYER_ONE_COLOR && p.getBackground() != Utils.PLAYER_TWO_COLOR) {
// p.setBackground(player == Utils.PLAYER_ONE ? Utils.PLAYER_ONE_COLOR : Utils.PLAYER_TWO_COLOR);
// this.switchPlayer();
// break;
// }
// }
// }
protected void init() {
/*
* On peut remplacer GridBagLayout par un GridLayout
@ -33,7 +21,7 @@ public class Grille extends JPanel {
GridBagLayout gbl = new GridBagLayout();
this.setLayout(gbl);
GridBagConstraints gbc = new GridBagConstraints();
grille = new Pion[Utils.COLUMN_COUNT][Utils.ROW_COUNT];
this.grille = new Pion[Utils.COLUMN_COUNT][Utils.ROW_COUNT];
for (int x = 0; x < Utils.COLUMN_COUNT; x++) {
for (int y = 0; y < Utils.ROW_COUNT; y++) {
Pion pion = new Pion();