Пробовал использовать
setCellValue(x, y, "");
вместо
setCellValue(x, y, EMPTY);
разницы нет.
Также менял
if (currentCell.countMineNeighbors == 0)
{
setCellValue(x, y, EMPTY);
List<GameObject> neighbors = getNeighbors(currentCell);
neighbors.removeIf(member -> member.isOpen);
neighbors.forEach(member -> openTile(member.x, member.y));
return;
}
на
if (currentCell.countMineNeighbors > 0)
{
setCellNumber(x, y, currentCell.countMineNeighbors);
return;
}
поведение не менялось.package com.javarush.games.minesweeper;
public class GameObject
{
public int x;
public int y;
public int countMineNeighbors;
public boolean isMine;
public boolean isOpen;
public boolean isFlag;
GameObject(int x, int y, boolean isMine)
{
this.x = x;
this.y = y;
this.isMine = isMine;
}
}