My method seems to work ok when I play the game. I am not sure why it is not passing. private void openTile(int x, int y) { // 3. The openTile(int, int) method must not do anything if the game is stopped (isGameStopped == true). if (isGameStopped) { return; } // 2. The openTile(int, int) method must not do anything if the element is flagged. if (gameField[y][x].isFlag) { return; } // 1. The openTile(int, int) method must not do anything if the element is already revealed. if (gameField[y][x].isOpen) { return; } if (gameField[y][x].isMine) { setCellValueEx(x, y, Color.RED, MINE); gameOver(); } // The openTile(int, int) method must draw the number of adjacent mines // if the gameObject at the passed coordinates is not a mine. else { gameField[y][x].isOpen = true; --countClosedTiles; if (gameField[y][x].countMineNeighbors != 0) { setCellNumber(x, y, gameField[y][x].countMineNeighbors); } else { setCellValue(x, y, ""); for (GameObject neighbor : getNeighbors(gameField[y][x])) { if (!gameField[neighbor.y][neighbor.x].isOpen) { openTile(neighbor.x, neighbor.y); } } } setCellColor(x, y, Color.GREEN); } // 6. The openTile(int, int) method must call the win() method if the number of hidden cells // is equal to the number of mines on the field and the last revealed cell is not a mine. if (countClosedTiles == countMinesOnField) { win(); } }