Implement shared 7-bag piece sequence

- Add generatePieceBag() and createPieceQueue() for 7-bag system
- Add pieceQueue and playerSequenceIndex to lobby state
- Modify spawnPiece() to consume from shared queue per player
- Update player-hold handler to manage sequence index on hold
- Add sequenceIndex to state updates for tracking
- Update client loadState() to receive sequenceIndex

Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
jozamudiandClaude Opus 4.6 committed 2026-03-21 01:37:55 +00:00
1 parent bdeb6c8849
commit 634c6e8eab
2 files changed
+87 -6

No files matched your search

+1
View File
@@ -366,6 +366,7 @@ class TetrisGame {
this.level = state.level;
this.gameOver = state.gameOver;
this.eliminated = state.eliminated;
this.sequenceIndex = state.sequenceIndex || 0;
this.dropInterval = Math.max(100, 1000 - (this.level - 1) * 100);
}
}