public boolean addFarmObjectToGrid(FarmObject obj) { if (grid[obj.getX()][obj.getY()] != null) { return false; } grid[obj.getX()][obj.getY()] = obj; return true; }
private void move(FarmObject obj) { grid[obj.getX()][obj.getY()] = null; grid[obj.getNewX()][obj.getNewY()] = obj; }