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

Add a fast-drop key #3

Open
juanmeleiro opened this issue May 26, 2024 · 0 comments
Open

Add a fast-drop key #3

juanmeleiro opened this issue May 26, 2024 · 0 comments

Comments

@juanmeleiro
Copy link

I really miss a fast-drop key (the down key in some implementations) for situations where I want to “tuck” a piece under another, and so have to wait for the falling one to drop all the way down.

I confess that I tried doing it myself, but got utterly confused by the code. Is that because I'm bad at C? Or because the original code was obfuscated? Who knows.

In particular, I leave these two questions:

  1. How does the c < 0 branch of the main loop get executed? c is only updated via getchar(), which won't read an EOF from stdin, unless I am missing something…
  2. How does the timer affect updates? It clearly does, because removing the signal handler halts updates. But it does nothing else other than just resetting the timer itself! Somehow, it's what appears to make the code go to the c < 0 branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant