« Go Back to Phase 1

In the initial post, I mentioned the need to store a transformation in some sort of {label - transformation} fashion.

Below, I've compiled an extensive list of the basic turns, including a mapping to their written form for later use.

type MoveSets =
    static member All = 
        [ { Label  = "F";  Transformation = F }; 
          { Label  = "F'"; Transformation = F' }; 
          { Label  = "F2"; Transformation = F2 }; 
          { Label  = "U";  Transformation = U }; 
          { Label  = "U'"; Transformation = U' }; 
          { Label  = "U2"; Transformation = U2 }; 
          { Label  = "R";  Transformation = R }; 
          { Label  = "R'"; Transformation = R' }; 
          { Label  = "R2"; Transformation = R2 }; 
          { Label  = "L";  Transformation = L }; 
          { Label  = "L'"; Transformation = L' }; 
          { Label  = "L2"; Transformation = L2 }; 
          { Label  = "D";  Transformation = D }; 
          { Label  = "D'"; Transformation = D' }; 
          { Label  = "D2"; Transformation = D2 }; 
          { Label  = "B";  Transformation = B }; 
          { Label  = "B'"; Transformation = B' }; 
          { Label  = "B2"; Transformation = B2 }; ]

Relevant Tests:

[<Fact>]
let ``Moveset 'all' should have 18 available turns.`` () =
    Movesets.MoveSets.All |> List.length |> should equal 18