completed clickCell(x,y) method to change value of cell by clicking it

This commit is contained in:
Raphaelsav 2024-04-27 18:16:03 +02:00
parent bd09662ce6
commit 64a3e59afe
1 changed files with 10 additions and 0 deletions

View File

@ -157,6 +157,16 @@ public class Simulator extends Thread {
*/
public void clickCell(int x, int y) {
//TODO : complete method
//if clickActionFlag = true then create an agent
//else if flag = false then change value of cell
if(clickActionFlag) {
}else {
if(getCell(x, y)==0) {
setCell(x, y, 1);
}else {setCell(x, y, 0);}
}
}
/**