mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
The paddle's movement is determined by the currently held keys. A key is no longer considered held when a matching keyup_event() fires. However, the event does not fire when the timer has stopped (e.g. due to a game over condition), which can result in the paddle keeping its former direction and moving on its own -- even after the player started a new game. Therefore, any held keys will be cleared explicitly.