* connected group, otherwise return a {@link java.util.List} of cell
* locations that form a disconnected group.
*/
public PuzzleMessage checkSolved() {
PuzzleMessage result = null;
int roomsPerCell[][] = countRoomsPerCell();
for (int x = 0; x < getWidth(); ++x) {
for (int y = 0; y < getHeight(); ++y) {
if (roomsPerCell[x][y] != 1) {
if (result == null) {
result = new PuzzleMessage(true, "Some cells are covered by more than one room.");
}
result.addErrorLocation(new Vec2i(x,y));
}
}
}
if (result != null) {
return result;
}
return new PuzzleMessage(false);
}