Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safely handle ESC right before topping out #46

Open
gregorulm opened this issue Jul 15, 2020 · 0 comments
Open

Safely handle ESC right before topping out #46

gregorulm opened this issue Jul 15, 2020 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@gregorulm
Copy link

Gameplay is only recorded if the game tops out. However, it can easily happen that the player hits ESC a fraction before actually topping out. This means that no replay of the current game will be saved, which may not be intended. Thus, as a workaround, consider adding a delay, e.g. if the game is very close to topping out (check if the spawning next piece would collide with the stack as that's a game over), intercept the ESC keypress and then let the game top out before you allow the user to exit.

@ghost ghost added bug Something isn't working enhancement New feature or request labels Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant