Types and helpers to deal with Adjust U Face (AUF), which are the moves needed either to adjust the U face to the right angle for executing your algorithms for several algorithm sets such as OLL and PLL, or the last move needed to solve the cube for example after PLL. See https://www.speedsolving.com/wiki/index.php/AUF for more information
A nonempty list containing all the possible aufs. Could for example be used to generate a random auf or generate all the possible versions of an algorithm
import List.Nonempty
-- They are all there!
List.Nonempty.length all --> 4
-- Generate a random one
List.Nonempty.sample all
import PLL
-- Get all versions of a Y perm
all
|> List.Nonempty.map (Tuple.pair PLL.Y)
|> List.Nonempty.map (\(pll, postAuf) ->
List.Nonempty.map
(\preAuf -> (preAuf, pll, postAuf))
all
)Get the algorithm that corresponds to the AUF
import Algorithm
toAlgorithm Halfway
--> Algorithm.fromTurnList
--> [ Algorithm.Turn
--> Algorithm.U
--> Algorithm.Halfway
--> Algorithm.Clockwise
--> ]Explains an issue that occurred while parsing an AUF
InvalidAUFAlgorithm: The algorithm was parsed correctly but was not either an empty move or a turn of the U face
AlgorithmParsingProblem: The string was not a valid algorithm string and the contained Algorithm.FromStringError has the problem with the string
Attempts to parse an algorithmic representation of an AUF
fromString "U'" --> Ok CounterClockwise
fromString "" --> Ok None
fromString "U B"
--> Err InvalidAUFAlgorithm
The 4 different AUFs. U, U', U2, and nothing. Use these value constructors together with @all when you need to construct in different ways.