The full sequence10 / 13

FSM and commands during a move

Follow what happens after the player releases a piece.

Suppose the player releases a piece over valid cells. The drag component sends PlacementRequested with slotId and anchor. The game’s FSM takes over. Game FSM

RequestDragComponent → PlacementRequested → PlaceBlockCommand
Validate and applyGameplay → Board / Slots / ScoreRules
Result snapshotsboardBeforeClear, boardAfterClear, clearedCells, scoreDelta
ScreenBoardChanged, BlocksChanged, ScoreChanged, and LinesCleared
The command changes game state through the service. The screen responds to separate result events.

What the FSM does

PlaceBlockCommand runs in playing. The FSM then enters resolvingPlacement, takes PlacementCompleted from the queue, and checks available moves in checkingMoves.

The diagram below walks through a successful placement.

One move through the FSM

This is a shortened Block Puzzle configuration. Place a piece to follow the FSM rules in order.

playingCurrent state
EventPlacementRequestedCommandPlaceBlockCommandTransitionresolvingPlacement
resolvingPlacementCurrent state
EventPlacementCompletedTransitioncheckingMoves
checkingMovesCurrent state
On entryCheckBlockPuzzleMovesCommand
EventMovesAvailableTransitionplaying
Queued eventnone
Waiting for a move

The FSM is in playing and waits for a placement request.

Sources ↗

Block Puzzle · BlockPuzzleGameplayService.ts↗Order of operations in place and result snapshots.Block Puzzle · fsm.config.ts↗Transitions for accepted and rejected placements.