Skip to content

Fix Tetris mobile: split controls + fix grid sizing#11

Merged
github-actions[bot] merged 1 commit into
mainfrom
claude/air-hockey-game-7VNDw
May 10, 2026
Merged

Fix Tetris mobile: split controls + fix grid sizing#11
github-actions[bot] merged 1 commit into
mainfrom
claude/air-hockey-game-7VNDw

Conversation

@samoletovs
Copy link
Copy Markdown
Owner

Fixes two mobile issues reported by the kids:

Controls — split into left/right thumb clusters:

  • Left hand: ← (left) and ↓ (down), stacked vertically
  • Right hand: 2×2 grid — ↑ rotate, → right, ⤓ hard drop, ⇆ hold
  • Auto-repeat when holding left/right/down (200ms delay, 60ms interval)
  • Switched from click to pointerdown for instant response

Grid sizing — pieces now fill the full board:

  • fitCanvas() now JS-driven: measures play-area and side panels, computes correct board width/height, sets board.style.width/height explicitly
  • draw() uses separate cellH = h/ROWS alongside cellW = w/COLS so pieces are rectangular cells, not squares clipped in the middle
  • Particles on line-clear also use cellH for correct y-position

Generated by Claude Code

@github-actions github-actions Bot merged commit 7e36795 into main May 10, 2026
2 checks passed
@github-actions github-actions Bot deleted the claude/air-hockey-game-7VNDw branch May 10, 2026 06:59
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

Successfully merging this pull request may close these issues.

2 participants