Подскажите пожалуйста, не знаю, почему не проходит валидацию. Нет идей. Посмотрел в комментах в конце строчку countMineNeighbors();, но понятия не имею, что она означает. Потом ее убрал. Я так понял, программа не считает кол-во мин или она должна их куда-то выводить. Хз.
package com.javarush.games.minesweeper;
import com.javarush.engine.cell.*;
public class MinesweeperGame extends Game{
private static final int SIDE = 9;
private int countMinesOnField;
boolean mine;
@Override
public void initialize() {
setScreenSize(SIDE, SIDE);
createGame();
}
private GameObject[][] gameField = new GameObject[SIDE][SIDE];
private void createGame() {
for (int x = 0; x < gameField.length; x++){
for (int y = 0; y < gameField.length; y++){
gameField[y][x] = new GameObject(x, y, mine);
if (getRandomNumber(10) == 0) {
mine = true;
countMinesOnField++;
}else
mine = false;
setCellColor(x, y, Color.ORANGE);
}
countMineNeighbors();
}
}
}