diff --git a/src/puzzle.cpp b/src/puzzle.cpp index 69c41e9..f617896 100644 --- a/src/puzzle.cpp +++ b/src/puzzle.cpp @@ -15,7 +15,7 @@ auto puzzle::block::hash() const -> size_t auto puzzle::block::valid() const -> bool { - return width > 0 && height > 0 && x >= 0 && x + width <= 9 && y >= 0 && y + height <= 9; + return width > 0 && height > 0 && x >= 0 && x + width <= MAX_WIDTH && y >= 0 && y + height <= MAX_HEIGHT; } auto puzzle::block::string() const -> std::string diff --git a/src/user_interface.cpp b/src/user_interface.cpp index 6cbb6dc..f7c25f9 100644 --- a/src/user_interface.cpp +++ b/src/user_interface.cpp @@ -832,7 +832,7 @@ auto user_interface::draw_puzzle_board() -> void } // Draw goal boundaries when editing - if (input.editing) { + if (input.editing && current.has_win_condition() && target_block) { DrawRectangleLinesEx(board_grid.square_bounds(target_x, target_y, target_block->width, target_block->height), 2.0, TARGET_BLOCK_COLOR); } }