From 25de4c1d75052431e37f59bfb5cc79c62211345a Mon Sep 17 00:00:00 2001 From: titou Date: Sun, 26 May 2024 12:35:54 +0200 Subject: [PATCH] getCell --- src/backend/Simulator.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/backend/Simulator.java b/src/backend/Simulator.java index 6b7201b..6a2c042 100644 --- a/src/backend/Simulator.java +++ b/src/backend/Simulator.java @@ -26,6 +26,8 @@ public class Simulator extends Thread { private int loopDelay = 150; //TODO : add missing attribute(s) + private int[][] field; + //DONE public Simulator(MyInterface mjfParam) { mjf = mjfParam; @@ -50,13 +52,13 @@ public class Simulator extends Thread { } public int getWidth() { - //TODO : replace with proper return - return 0; + return COL_NUM; + //DONE } public int getHeight() { - //TODO : replace with proper return - return 0; + return LINE_NUM; + //DONE } //Should probably stay as is @@ -154,8 +156,8 @@ public class Simulator extends Thread { * @return value of cell */ public int getCell(int x, int y) { - //TODO : complete method with proper return - return 0; + return field[y][x]; + //DONE } /** *