V-Wong/CubeSimRS

Scramble parser improvements

stanleydesu opened this issue · 1 comments

parse_scramble should:

  • trim the provided scramble
  • split by whitespace (use split_whitespace instead of split(' ')
  • return an empty Vec for a string with no moves, as it currently panics on this case

scramble.trim().split_whitespace().map(convert_move).collect() works well.