Why do i have this error :
error: 'void' type not allowed here
for(GameObject neighbor : getNeighbors(gameField[y][x])) {
Line 172.
I dont get its a for loop... why the error?
package com.codegym.games.minesweeper;
public class GameObject {
public int x;
public int y;
public boolean isMine;
public int countMineNeighbors;
public boolean isOpen;
public boolean isFlag;
public GameObject(int x,int y, boolean isMine){
this.x = x;
this.y = y;
this.isMine = isMine;
}
}