Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
fix: respond to window events when the game ends
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenMian committed Jul 24, 2023
1 parent 59fe6d8 commit b22eaa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gomoku.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ class Gomoku
window_.clear(sf::Color(242, 208, 75));
board_.draw(window_);
window_.display();
sf::sleep(sf::seconds(5.f));

sf::Clock clock;
while(clock.getElapsedTime() < sf::seconds(5.f))
handle_window_event();

reset();
return;
Expand Down

0 comments on commit b22eaa5

Please sign in to comment.