Hold block added
This commit is contained in:
@ -118,6 +118,12 @@ void PlayingState::handleEvent(const SDL_Event& e) {
|
||||
|
||||
// Tetris controls (only when not paused)
|
||||
if (!ctx.game->isPaused()) {
|
||||
// Hold / swap current piece (H)
|
||||
if (e.key.scancode == SDL_SCANCODE_H) {
|
||||
ctx.game->holdCurrent();
|
||||
return;
|
||||
}
|
||||
|
||||
// Rotation (still event-based for precise timing)
|
||||
if (e.key.scancode == SDL_SCANCODE_UP) {
|
||||
// Use user setting to determine whether UP rotates clockwise
|
||||
|
||||
Reference in New Issue
Block a user