13 explicit PuzzleGame(
int difficulty, std::function<
void()> lineSoundCallback);
18 std::array<GameGrid, 4>
grid{};
38 [[nodiscard]] Block *blockAt(
const CellRef &cell);
39 [[nodiscard]]
const Block *blockAt(
const CellRef &cell)
const;
40 [[nodiscard]]
static CellBounds cellBounds(
const CellRef &cell);
41 [[nodiscard]]
bool sameCell(
const CellRef &a,
const CellRef &b)
const;
42 [[nodiscard]]
bool findNextVisualMatch(
const CellRef ¤t,
int color,
int dx,
int dy, CellRef &next)
const;
43 [[nodiscard]]
bool clearVisualRun();
44 bool clearRun(GameGrid &focusGrid,
int x,
int y,
int dx,
int dy);
45 void clearTopBottomSeams();
46 bool clearSeam(std::array<Block *, 4> blocks);
47 void moveDownBlocks();
48 static void markClearing(Block &block);
50 void playClearSound();
52 std::function<void()> playLineSound;