move method

Cube move(
  1. Move move
)

Turns a face of the Cube applying a move.

Implementation

Cube move(Move move) {
  final type = move.color.index * 3;
  final power = move.inverted
      ? 2
      : move.double
          ? 1
          : 0;
  return _move(type + power);
}