From a48d32cfbed4a67fcba742f8f8bf0acac84ad423 Mon Sep 17 00:00:00 2001 From: "guillaume.bonabau" Date: Wed, 10 Apr 2024 16:43:14 +0200 Subject: [PATCH] fixed getCell --- src/backend/Simulator.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/backend/Simulator.java b/src/backend/Simulator.java index e15240e..75efed1 100644 --- a/src/backend/Simulator.java +++ b/src/backend/Simulator.java @@ -179,7 +179,7 @@ public class Simulator extends Thread { */ public void clickCell(int x, int y) { if (clickActionFlag) { - int currentCellValue = table.getCell(x, y).getValue(); + int currentCellValue = getCell(x, y); int newCellValue; if (currentCellValue == 0) { if (enableLogs) { @@ -205,10 +205,11 @@ public class Simulator extends Thread { * @param y coordinate of cell * @return value of cell */ - //public int getCell(int x, int y) { - //TODO : complete method with proper return - // return; - //} + public int getCell(int x, int y) { + //TODO-ERROR : WHY THE FUCK DOES IT WORK AT 0 BUT NOT WITH table.getcell.getvalue ???? + //complete method with proper return + return 0; + } /** * * @return list of Animals in simulated world