completed clickCell(x,y) method to change value of cell by clicking it
This commit is contained in:
parent
bd09662ce6
commit
64a3e59afe
|
|
@ -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);}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue