Tool tree
gradeNot graded
page: Every page
get_gameAnswer
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.
View tool JSON
{
"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.",
"inputSchema": {
"type": "object",
"properties": {}
},
"page": "/"
}list_placementsAnswer
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.
View tool JSON
{
"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.",
"inputSchema": {
"type": "object",
"properties": {}
},
"page": "/"
}placeAction
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).
View tool JSON
{
"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).",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "e.g. -r1c4 or Hr0c2"
}
},
"required": [
"id"
]
},
"page": "/"
}new_gameAction
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.
View tool JSON
{
"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.",
"inputSchema": {
"type": "object",
"properties": {
"seed": {
"type": "integer"
},
"turnBased": {
"type": "boolean"
}
}
},
"page": "/"
}