fix board goal rendering bug if no target block exists or board has no win condition

This commit is contained in:
2026-03-01 00:30:01 +01:00
parent 846ff72d1f
commit c7361fe47e
2 changed files with 2 additions and 2 deletions

View File

@ -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