if(!gameField[y][x].isMine){//if a cell has no mine for(GameObject cell : getNeighbors(gameField[y][x]))//I do not understand this part if(cell.isMine) cell.countMineNeighbors++;//if a cell has a mine //return the number of mines adjacent to this cell? I do not understand how this works } I am buiding this game for the second time and I still do not understand how this part works. I just copied the code from someone else.... Can someone please enlighten me?