Module: Sashite::Sin
- Defined in:
- lib/sashite/sin.rb,
lib/sashite/sin/identifier.rb
Overview
SIN (Style Identifier Notation) implementation for Ruby
Provides a rule-agnostic format for identifying styles in abstract strategy board games. SIN uses single ASCII letters with case-based side encoding, enabling clear distinction between different style families in multi-style gaming environments.
Format: <style-letter>
-
Uppercase letter: First player styles (A, B, C, …, Z)
-
Lowercase letter: Second player styles (a, b, c, …, z)
-
Single character only: Each SIN identifier is exactly one ASCII letter
Examples:
"C" - First player, C style family
"c" - Second player, C style family
"S" - First player, S style family
"s" - Second player, S style family
Defined Under Namespace
Classes: Identifier
Class Method Summary collapse
-
.identifier(letter, side) ⇒ Sin::Identifier
Create a new identifier instance.
-
.parse(sin_string) ⇒ Sin::Identifier
Parse an SIN string into an Identifier object.
-
.valid?(sin_string) ⇒ Boolean
Check if a string is a valid SIN notation.
Class Method Details
.identifier(letter, side) ⇒ Sin::Identifier
Create a new identifier instance
61 62 63 |
# File 'lib/sashite/sin.rb', line 61 def self.identifier(letter, side) Identifier.new(letter, side) end |
.parse(sin_string) ⇒ Sin::Identifier
Parse an SIN string into an Identifier object
48 49 50 |
# File 'lib/sashite/sin.rb', line 48 def self.parse(sin_string) Identifier.parse(sin_string) end |
.valid?(sin_string) ⇒ Boolean
Check if a string is a valid SIN notation
35 36 37 |
# File 'lib/sashite/sin.rb', line 35 def self.valid?(sin_string) Identifier.valid?(sin_string) end |