Whisk (Whisk v0.0.3) View Source
The scrambler.
Link to this section Summary
Types
A string representation of a puzzle type.
A scramble is string representing a sequence of moves, separated by spaces.
Link to this section Types
Specs
puzzle_type() :: String.t()
A string representation of a puzzle type.
See puzzle_types/0 for supported values.
Specs
scramble() :: String.t()
A scramble is string representing a sequence of moves, separated by spaces.
Moves are also strings. Different puzzle types have different valid moves.
Link to this section Functions
Specs
puzzle_types() :: list()
Returns a list of supported puzzle types.
iex> Whisk.puzzle_types()
["2x2", "3x3", "4x4", "5x5", "6x6", "7x7", "Skewb"]
Specs
scramble(puzzle_type(), list()) :: scramble()
Generate a scramble for a puzzle type.
Passing an unsupported puzzle type will generate an error.
Options
:length- the number of moves in the scramble
Examples
iex> Whisk.scramble("3x3")
"L F2 U R D B U2 R F' R F R2 D2 B R' B' D R B U"
iex> Whisk.scramble("Skewb", length: 12)
"L R B' R U' R' B L' U' B' L R U' R' L'"