Taroimo Science Lab日本語

All simulationsMenu

← All simulations

Connected Components with a Falling-Block Puzzle

Exaggerated displayPlay

A falling-block puzzle: blocks fall in pairs, and four or more of the same color that connect disappear. The cycle "fall → check connections → clear" can be paused stage by stage, and numbers on the blocks show the order in which the computer finds each same-color group with a breadth-first or depth-first flood fill.

  • Press "Watch the chain example" to see, slowly, how dropping one pair sets off a 3-chain.
  • Press "Start a game" to play. Keyboard: ←→ move, ↑ or X rotate right, Z rotate left, ↓ drop. On touch screens, use the buttons such as "← Move left", which sit right below the board on a phone held upright. On the board, tap to rotate right, drag sideways to move, or drag down to drop.
  • Switch "Flood-fill method" between BFS, which uses a queue, and DFS, which uses a stack. Compare the numbers on the blocks, which show the visiting order, and the row of waiting cells.
  • Turn on "Pause between stages" to stop at ① fall, ② check connections and ③ clear; press "Next stage" to go on.
  • Use "Blocks needed to clear" to change how many connected blocks disappear.
  • Turn on "Edit" under "Edit the board", tap cells to place colors, then press "Run chains on this board" to test a chain you built.