From f2f3b4c5c06110af23ddbf7bb0226181bf8f1994 Mon Sep 17 00:00:00 2001 From: keraudre Date: Tue, 30 Apr 2024 17:31:44 +0200 Subject: [PATCH] =?UTF-8?q?debut=20de=20la=20v=C3=A9rification=20des=20reg?= =?UTF-8?q?ions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VerifButton.java | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/VerifButton.java b/VerifButton.java index 822ac3b..8c14218 100644 --- a/VerifButton.java +++ b/VerifButton.java @@ -28,15 +28,14 @@ public class VerifButton implements ActionListener { int comparateur; int evaluant; - boolean valide = true; + boolean valide = true; + int[] list_region; for (int i = 0; i < this.GRID_SIZE; i++) { for(int j = 0; j < this.GRID_SIZE; j++) { - if (grid[i][j].getText().isEmpty()) { + if (!grid[i][j].getText().isEmpty()) { - }else{ - evaluant = Integer.parseInt(grid[i][j].getText()); @@ -106,6 +105,26 @@ public class VerifButton implements ActionListener { } //test de validité sur la région + + if ( i < 3) { + + if ( j < 3) { + + for (int v = 0; v < 3; v++) { + for (int w = 0; w < 3; w++) { + + if (!grid[v][w].getText().isEmpty()) { + + list_region.add(grid[v][w].getText().isEmpty()); + + } + } + } + + + + + } }