allow to restrict block movement to principal block directions + add more samples

This commit is contained in:
2026-02-18 03:16:13 +01:00
parent e2e75204ef
commit 7faa8ecdb7
5 changed files with 249 additions and 72 deletions

View File

@ -123,7 +123,8 @@ auto Renderer::DrawKlotski(const State &state, int hov_x, int hov_y, int sel_x,
DrawRectangle(0, 0, width, height, RAYWHITE);
DrawRectangle(x_offset, y_offset,
board_width - 2 * x_offset + 2 * BOARD_PADDING,
board_height - 2 * y_offset + 2 * BOARD_PADDING, LIGHTGRAY);
board_height - 2 * y_offset + 2 * BOARD_PADDING,
state.restricted ? DARKGRAY : LIGHTGRAY);
for (int x = 0; x < state.width; ++x) {
for (int y = 0; y < state.height; ++y) {
DrawRectangle(x_offset + BOARD_PADDING + x * BLOCK_PADDING * 2 +