import { Puzzle } from '../puzzle'; import { CubeFace, CubeOptions, CubeSolvedOptions, CubeSticker, CubeTurn } from './types'; export type { CubeSticker, CubeFace, } from './types'; export declare class Cube implements Puzzle { /** * Data factory for stickers. */ readonly data: () => T; /** * Random number generator. */ readonly rand: () => number; /** * Size of the cube. */ readonly size: number; /** * State of the cube. */ readonly state: Record[]>; /** * Create a new cube. * @param opts - The options for the cube. */ constructor(opts?: number | CubeOptions); /** * Visit every sticker on the given face in order. */ forEachSide(face: CubeFace, fn: (sticker: CubeSticker) => void): void; /** * Generate a scramble */ generateScramble(depth?: number): string; /** * Parse turn notation against the current cube size */ parseTurn(source: string): CubeTurn; /** * Scramble the puzzle to a given depth */ scramble(depth?: number): this; /** * Stringify a cube turn object */ stringifyTurn(turn: CubeTurn): string; /** * Test if the puzzle is solved. * @param opts - When `super: true`, requires all indexes in order and all rotations 0. */ solved(opts?: CubeSolvedOptions): boolean; /** * Reset the puzzle to it's starting state */ reset(): this; /** * Execute a turn, or whitespace-separated sequence of turn notation */ turn(turn: CubeTurn | string): this; }