/** * Tetris game extension - play Tetris with /tetris command */ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; export declare const BOARD_WIDTH = 10; export declare const BOARD_HEIGHT = 20; export declare const HIDDEN_ROWS = 4; export declare const TOTAL_HEIGHT: number; export declare const LEVEL_SPEEDS: number[]; export declare const LINES_PER_LEVEL = 10; export declare const LINE_SCORES: Record; export type Shape = readonly (readonly number[])[]; export interface Position { x: number; y: number; } export interface PieceDef { name: string; color: string; rotations: readonly Shape[]; } export interface Piece { def: PieceDef; rotation: number; pos: Position; } export interface GameState { board: number[][]; current: Piece | null; next: PieceDef; score: number; lines: number; level: number; gameOver: boolean; highScore: number; } export declare const PIECE_DEFS: readonly PieceDef[]; export declare const PIECE_COLOR_MAP: Record; export declare function randomPiece(): PieceDef; export declare function createBoard(): number[][]; export declare function getShape(piece: Piece): Shape; export declare function getPieceCells(piece: Piece): Position[]; export declare function isValidPlacement(board: number[][], cells: Position[]): boolean; export declare function tryMove(board: number[][], piece: Piece, dx: number, dy: number): Piece | null; export declare function tryRotate(board: number[][], piece: Piece): Piece | null; export declare function hardDrop(board: number[][], piece: Piece): Piece; export declare function lockPiece(board: number[][], piece: Piece): number[][]; export declare function clearLines(board: number[][]): { board: number[][]; linesCleared: number; }; export declare function calculateScore(linesCleared: number, level: number): number; export declare function calculateLevel(totalLines: number): number; export declare function getSpeed(level: number): number; export declare function isGameOver(board: number[][], def: PieceDef): boolean; export declare function createPiece(def: PieceDef): Piece; export declare function createInitialState(highScore?: number): GameState; export default function (pi: ExtensionAPI): void; //# sourceMappingURL=index.d.ts.map