« Go Back to Phase 1

The code from the previous post can be shortened rather nicely.

I will post here without furhter comment needed.

let Execute cubeState t = 
    { EdgePositions   = [| for a in 0 .. 11 do yield cubeState.EdgePositions.[t.EdgePositions.[a]] |]
      EdgeFlips       = [| for a in 0 .. 11 do yield (cubeState.EdgeFlips.[t.EdgePositions.[a]] + t.EdgeFlips.[a]) % 2 |]
      CornerPositions = [| for a in 0 .. 7 do yield cubeState.CornerPositions.[t.CornerPositions.[a]] |]
      CornerTwists    = [| for a in 0 .. 7 do yield (cubeState.CornerTwists.[t.CornerPositions.[a]] + t.CornerTwists.[a]) % 3 |] }