{"ok":true,"site":{"host":"tetris.cocode.dk","url":"https://tetris.cocode.dk/","type":"live","desc":"Play classic Tetris free in your browser: seven pieces, hold, next queue and neon visual effects. Keyboard and touch. No install, no sign-up.","tools":[{"name":"get_game","kind":"answer","impl":"imperative","description":"The Tetris game now: status (start, playing, paused, over); board as 20 strings of 10 characters, top row first (\".\" empty, else a piece letter; the falling piece is not in it); current piece with its cells as [column, row] (row 0 = top, negative = above the board); hold, canHold, the next five pieces, score, level, lines and turnBased.","title":"Get the game","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/","/fa/"]},{"name":"list_placements","kind":"answer","impl":"imperative","description":"Every place the current piece can go by rotating, sliding, then dropping straight down, and when canHold, the same for the piece hold would bring (useHold: true). Each has an id for place, piece, rotation, column (leftmost cell), and the result: linesCleared, holes, height of the stack and bumpiness. Empty before a game starts and after it ends; while paused it lists as usual and place resumes.","title":"List placements","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/","/fa/"]},{"name":"place","kind":"act","impl":"imperative","description":"Puts the current piece at a placement from list_placements by pressing the player's own keys (hold, rotate, move, hard drop). Resumes a paused game first. Returns the game as get_game does, the placement and the events it caused (lock, clear, levelUp, gameOver).","title":"Place the piece","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"e.g. -r1c4 or Hr0c2"}},"required":["id"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/","/fa/"]},{"name":"new_game","kind":"act","impl":"imperative","description":"Starts a new game, ending any game in play. seed (integer) repeats a piece sequence. turnBased: true stops gravity and the lock delay, so the piece waits for place. Returns the game as get_game does.","title":"Start a new game","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"seed":{"type":"integer"},"turnBased":{"type":"boolean"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/","/fa/"]}],"category":"Media & Personal","favicon":"/favicons/tetris.cocode.dk.png","apiSurface":"spec","toolCount":4}}