Module: Sashite::Hand
- Defined in:
- lib/sashite/hand.rb
Overview
HAND (Hold And Notation Designator) implementation
HAND defines a simple, standardized notation for piece reserve locations in board games where pieces can be held off-board and potentially placed.
Constant Summary collapse
- RESERVE =
The reserve location character
"*"
Class Method Summary collapse
-
.reserve?(string) ⇒ Boolean
Check if a string represents the reserve location.
-
.to_s ⇒ String
Get the canonical HAND representation.
Class Method Details
.reserve?(string) ⇒ Boolean
Check if a string represents the reserve location
30 31 32 |
# File 'lib/sashite/hand.rb', line 30 def self.reserve?(string) RESERVE.eql?(string) end |
.to_s ⇒ String
Get the canonical HAND representation
40 41 42 |
# File 'lib/sashite/hand.rb', line 40 def self.to_s RESERVE end |