From c23300e47402c0abaa7555dc283e7342db299657 Mon Sep 17 00:00:00 2001 From: Justine Yannis Date: Thu, 13 Oct 2022 11:05:39 +0200 Subject: [PATCH] Fonction inutiles --- .../src/fr/iutfbleau/projetAgile/View/Grille.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/View/Grille.java b/projetAgile/src/fr/iutfbleau/projetAgile/View/Grille.java index e967db6..a9ffe7b 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/View/Grille.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/View/Grille.java @@ -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();