Не можу зрозуміти що Валідатору не подобаєтся. Ніякий код не приймаєтся валідатором.
public class MinesweeperGame extends Game {
private static final int SIDE = 25;
private GameObject[][] gameField = new GameObject[SIDE][SIDE];
private int countMinesOnField = 0;
public void initialize() {
setScreenSize(SIDE, SIDE);
createGame();
}
private void createGame() {
boolean isMine;
for (int y = 0; y < SIDE; y++) {
for (int x = 0; x < SIDE; x++) {
if (getRandomNumber(10) < 1) {
isMine = true;
countMinesOnField++;
}
else isMine = false;
gameField[y][x] = new GameObject(x, y, isMine);
setCellColor(x, y, Color.ORANGE);
}
}
}
}
package com.javarush.games.minesweeper;
public class GameObject {
public int x;
public int y;
public boolean isMine;
public GameObject(int x, int y, boolean isMine){
this.x = x;
this.y = y;
this.isMine = isMine;
}
}