Class: TwistyPuzzles::BernhardLetterScheme

Inherits:
LetterScheme show all
Defined in:
lib/twisty_puzzles/letter_scheme.rb

Overview

Letter scheme used by Bernhard Brodowsky.

Constant Summary collapse

PART_TYPE_BUFFERS =
{
  Corner => Corner.for_face_symbols(%i[U L B]),
  Edge => Edge.for_face_symbols(%i[U F]),
  Wing => Wing.for_face_symbols(%i[F U]),
  XCenter => XCenter.for_face_symbols(%i[U R F]),
  TCenter => TCenter.for_face_symbols(%i[U F])
}.freeze

Instance Method Summary collapse

Methods inherited from LetterScheme

#for_letter, #initialize, #letter, #parse_part, #valid_letter?

Constructor Details

This class inherits a constructor from TwistyPuzzles::LetterScheme

Instance Method Details

#alphabetObject



55
56
57
# File 'lib/twisty_puzzles/letter_scheme.rb', line 55

def alphabet
  @alphabet ||= 'a'.upto('x').to_a
end

#canonicalize_letter(letter) ⇒ Object



59
60
61
# File 'lib/twisty_puzzles/letter_scheme.rb', line 59

def canonicalize_letter(letter)
  letter.downcase
end

#default_buffer(part_type) ⇒ Object



68
69
70
# File 'lib/twisty_puzzles/letter_scheme.rb', line 68

def default_buffer(part_type)
  PART_TYPE_BUFFERS[part_type]
end

#shoot_letters(_part_type) ⇒ Object

Letters that we shoot to by default.



64
65
66
# File 'lib/twisty_puzzles/letter_scheme.rb', line 64

def shoot_letters(_part_type)
  %w[a b d l h t p]
end