I don't get it. Why last condition is not okay?
package com.codegym.games.minesweeper;
import com.codegym.engine.cell.*;
import javafx.geometry.Side;
public class MinesweeperGame extends Game{
private GameObject[][] gameField = new GameObject[SIDE][SIDE];
private static final int SIDE = 9;
int mineCounter = 0;
private int countMinesOnField;
public void initialize(){
setScreenSize(9,9);
createGame();
}
private void createGame() {
this.countMinesOnField = mineCounter;
for (int i = 0; i < SIDE; i++) {
for (int j = 0; j < SIDE; j++) {
int n = getRandomNumber(10);
if (n == 9) {
++mineCounter;
gameField[i][j] = new GameObject(j, i, true);
setCellColor(j, i, Color.GREEN);
}
else {
gameField[i][j] = new GameObject(j, i, false);
setCellColor(j, i, Color.GREEN);
}
}
}
//System.out.println(mineCounter);
}
}