I can't fullfill the requestst - when I try this:
private void restart() {
isGameStopped = false;
countClosedTiles = SIDE * SIDE;
score = 0;
setScore(score);
countMinesOnField = 0;
}
I got following error:
The createGame() method must clear all items (flags, mines, numbers) from the playing field. Use the setCellValue(int, int, String) method. Pass an empty string as the last argument.
When I try to add to the code following piece:
for (int y=0; y<SIDE; y++) {
for (int x=0; x<SIDE; x++) {
setCellValue(x, y, "");
}
}
I got a lot of weird errors, for instance, that I have to assign false to isGameStopped field. But I am do doing this!
My game works correctly, but I can't pass the tests. :-(