Fixed bug where changing layout on game over would overflow timer

This commit is contained in:
2024-05-08 16:49:17 +05:30
parent 53ae6b9962
commit d0d61cbc15

View File

@@ -420,16 +420,22 @@ int main(void)
{
state.layout = State<X, Y>::Layout::UNLIMITED;
state.reset();
time_start = Clock::now();
time_cur = time_start;
}
else if (IsKeyPressed(KEY_TWO))
{
state.layout = State<X, Y>::Layout::WALLS;
state.reset();
time_start = Clock::now();
time_cur = time_start;
}
else if (IsKeyPressed(KEY_THREE))
{
state.layout = State<X, Y>::Layout::WALLED_GARDEN;
state.reset();
time_start = Clock::now();
time_cur = time_start;
}
if (!paused && !failed)
{