2048-cli-game
Version:
2048 game for terminal.
23 lines (22 loc) • 771 B
TypeScript
export declare const sumArray: (arr: number[]) => number;
export declare const getEmptyCells: (nums: number[][]) => {
row: number;
col: number;
}[];
export declare const getRandomCells: (emptyCells: {
row: number;
col: number;
}[]) => {
row: number;
col: number;
} | undefined;
export declare const moveTiles: (board: number[][], direction: "up" | "down" | "left" | "right") => {
board: any;
moved: boolean;
score: number;
};
export declare function countDigits(num: number): number;
export declare const randomGenerateNum: (board: number[][]) => any;
export declare const isGameOver: (nums: number[][]) => boolean;
export declare const hasMaxValue: (board: number[][]) => boolean;
export declare const initializeBoard: () => any[][];