Module: TwistyPuzzles::MSlicePrintHelper

Included in:
FatMSliceMove, InnerMSliceMove, MaybeFatMSliceMaybeInnerMSliceMove
Defined in:
lib/twisty_puzzles/cube_move.rb

Overview

Helper class to print various types of M slice moves.

Instance Method Summary collapse

Instance Method Details

#to_sObject



11
12
13
14
15
16
17
# File 'lib/twisty_puzzles/cube_move.rb', line 11

def to_s
  use_face = AbstractMove::SLICE_NAMES.key?(@axis_face)
  axis_face = use_face ? @axis_face : @axis_face.opposite
  direction = use_face ? @direction : @direction.inverse
  slice_name = AbstractMove::SLICE_NAMES[axis_face]
  "#{slice_name}#{direction.name}"
end