Module: Sashite::Drop
- Defined in:
- lib/sashite/drop.rb
Overview
DROP (Droppable Reserve Operations Placement) implementation
DROP defines a simple, standardized notation for piece reserve locations in board games where captured pieces can be held and/or placed onto the board.
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 DROP representation.
Class Method Details
.reserve?(string) ⇒ Boolean
Check if a string represents the reserve location
31 32 33 |
# File 'lib/sashite/drop.rb', line 31 def self.reserve?(string) RESERVE.eql?(string) end |
.to_s ⇒ String
Get the canonical DROP representation
41 42 43 |
# File 'lib/sashite/drop.rb', line 41 def self.to_s RESERVE end |