sashite-sin 1.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3411653c81ceb4f7711d40c8a924a2efc16e4573797dbd593d5e97cc95a5c643
4
- data.tar.gz: 00776c4a29a213e1146cbbee42792c132706f64ac0b500c0389b3b0814fa9264
3
+ metadata.gz: 2b57d90bf310c7367cfb46d8fd7a927629c9daf51fea8fcb4c678abfe28bedba
4
+ data.tar.gz: 535401969041a91f3d54f05e022ac7f0f78ea705075dccfd5f306b402f7fa8a7
5
5
  SHA512:
6
- metadata.gz: d818c870d4a9dc08f74da00acf89662c0e4794ba55bc658d4aca25a1895edc8ded12df5a83f4378375392c1576b12bbb29e47668732089b096fde659153a87da
7
- data.tar.gz: 2ebe9efb770a4ca03319d74bc53965dc40d7e5778663a6b4d4a1ab6f7f07a7ef338a313e50f664a49068f0593a88ff5b893f62a3b91c7a88b1fe5a73729bd9ef
6
+ metadata.gz: 73e7edb26036041f09a93b5ae1f21c125ea34b8981dcc4d255674e2319d47bc733022e35d33d203792f5b750e9054695779c4e470d6500e87c7de35c2290653b
7
+ data.tar.gz: 0b828c1a6e076de5c29e6eaf32149719cfd4a1fcc3a6f30fd276bd3afdbf923aee5aabb90812684a3f5c6d3106889422b76deaeadf60c7e9cff2a2dcdc7fdf80
data/README.md CHANGED
@@ -33,15 +33,15 @@ gem install sashite-sin
33
33
  ```ruby
34
34
  require "sashite/sin"
35
35
 
36
- # Parse SIN strings into style objects
37
- style = Sashite::Sin.parse("C") # => #<Sin::Style letter=:C side=:first>
38
- style.to_s # => "C"
39
- style.letter # => :C
40
- style.side # => :first
36
+ # Parse SIN strings into identifier objects
37
+ identifier = Sashite::Sin.parse("C") # => #<Sin::Identifier letter=:C side=:first>
38
+ identifier.to_s # => "C"
39
+ identifier.letter # => :C
40
+ identifier.side # => :first
41
41
 
42
- # Create styles directly
43
- style = Sashite::Sin.style(:C, :first) # => #<Sin::Style letter=:C side=:first>
44
- style = Sashite::Sin::Style.new(:c, :second) # => #<Sin::Style letter=:c side=:second>
42
+ # Create identifiers directly
43
+ identifier = Sashite::Sin.identifier(:C, :first) # => #<Sin::Identifier letter=:C side=:first>
44
+ identifier = Sashite::Sin::Identifier.new(:c, :second) # => #<Sin::Identifier letter=:c side=:second>
45
45
 
46
46
  # Validate SIN strings
47
47
  Sashite::Sin.valid?("C") # => true
@@ -50,38 +50,38 @@ Sashite::Sin.valid?("1") # => false (not a letter)
50
50
  Sashite::Sin.valid?("CC") # => false (not single character)
51
51
  ```
52
52
 
53
- ### Style Transformations
53
+ ### Identifier Transformations
54
54
 
55
55
  ```ruby
56
56
  # All transformations return new immutable instances
57
- style = Sashite::Sin.parse("C")
57
+ identifier = Sashite::Sin.parse("C")
58
58
 
59
59
  # Flip player assignment
60
- flipped = style.flip # => #<Sin::Style letter=:c side=:second>
61
- flipped.to_s # => "c"
60
+ flipped = identifier.flip # => #<Sin::Identifier letter=:c side=:second>
61
+ flipped.to_s # => "c"
62
62
 
63
63
  # Change letter
64
- changed = style.with_letter(:S) # => #<Sin::Style letter=:S side=:first>
65
- changed.to_s # => "S"
64
+ changed = identifier.with_letter(:S) # => #<Sin::Identifier letter=:S side=:first>
65
+ changed.to_s # => "S"
66
66
 
67
67
  # Change side
68
- other_side = style.with_side(:second) # => #<Sin::Style letter=:c side=:second>
69
- other_side.to_s # => "c"
68
+ other_side = identifier.with_side(:second) # => #<Sin::Identifier letter=:c side=:second>
69
+ other_side.to_s # => "c"
70
70
 
71
71
  # Chain transformations
72
- result = style.flip.with_letter(:M) # => #<Sin::Style letter=:m side=:second>
73
- result.to_s # => "m"
72
+ result = identifier.flip.with_letter(:M) # => #<Sin::Identifier letter=:m side=:second>
73
+ result.to_s # => "m"
74
74
  ```
75
75
 
76
76
  ### Player and Style Queries
77
77
 
78
78
  ```ruby
79
- style = Sashite::Sin.parse("C")
79
+ identifier = Sashite::Sin.parse("C")
80
80
  opposite = Sashite::Sin.parse("s")
81
81
 
82
82
  # Player identification
83
- style.first_player? # => true
84
- style.second_player? # => false
83
+ identifier.first_player? # => true
84
+ identifier.second_player? # => false
85
85
  opposite.first_player? # => false
86
86
  opposite.second_player? # => true
87
87
 
@@ -95,23 +95,23 @@ chess1.same_side?(shogi) # => true (both first player)
95
95
  chess1.same_letter?(shogi) # => false (different letters)
96
96
  ```
97
97
 
98
- ### Style Collections
98
+ ### Identifier Collections
99
99
 
100
100
  ```ruby
101
- # Working with multiple styles
102
- styles = %w[C c S s M m].map { |sin| Sashite::Sin.parse(sin) }
101
+ # Working with multiple identifiers
102
+ identifiers = %w[C c S s M m].map { |sin| Sashite::Sin.parse(sin) }
103
103
 
104
104
  # Filter by player
105
- first_player_styles = styles.select(&:first_player?)
106
- first_player_styles.map(&:to_s) # => ["C", "S", "M"]
105
+ first_player_identifiers = identifiers.select(&:first_player?)
106
+ first_player_identifiers.map(&:to_s) # => ["C", "S", "M"]
107
107
 
108
108
  # Group by letter family
109
- by_letter = styles.group_by { |s| s.letter.to_s.upcase }
109
+ by_letter = identifiers.group_by { |i| i.letter.to_s.upcase }
110
110
  by_letter["C"].size # => 2 (both C and c)
111
111
 
112
112
  # Find specific combinations
113
- chess_styles = styles.select { |s| s.letter.to_s.upcase == "C" }
114
- chess_styles.map(&:to_s) # => ["C", "c"]
113
+ chess_identifiers = identifiers.select { |i| i.letter.to_s.upcase == "C" }
114
+ chess_identifiers.map(&:to_s) # => ["C", "c"]
115
115
  ```
116
116
 
117
117
  ## Format Specification
@@ -148,15 +148,15 @@ The SIN specification is rule-agnostic and does not define specific letter assig
148
148
  ### Traditional Game Families
149
149
 
150
150
  ```ruby
151
- # Chess family styles
151
+ # Chess family identifiers
152
152
  chess_white = Sashite::Sin.parse("C") # First player, Chess family
153
153
  chess_black = Sashite::Sin.parse("c") # Second player, Chess family
154
154
 
155
- # Shōgi family styles
155
+ # Shōgi family identifiers
156
156
  shogi_sente = Sashite::Sin.parse("S") # First player, Shōgi family
157
157
  shogi_gote = Sashite::Sin.parse("s") # Second player, Shōgi family
158
158
 
159
- # Xiangqi family styles
159
+ # Xiangqi family identifiers
160
160
  xiangqi_red = Sashite::Sin.parse("X") # First player, Xiangqi family
161
161
  xiangqi_black = Sashite::Sin.parse("x") # Second player, Xiangqi family
162
162
  ```
@@ -172,9 +172,9 @@ def create_hybrid_match
172
172
  ]
173
173
  end
174
174
 
175
- styles = create_hybrid_match
176
- styles[0].same_side?(styles[1]) # => false (different players)
177
- styles[0].same_letter?(styles[1]) # => false (different families)
175
+ identifiers = create_hybrid_match
176
+ identifiers[0].same_side?(identifiers[1]) # => false (different players)
177
+ identifiers[0].same_letter?(identifiers[1]) # => false (different families)
178
178
  ```
179
179
 
180
180
  ### Variant Families
@@ -195,14 +195,14 @@ makruk_black.to_s # => "m"
195
195
  ### Main Module Methods
196
196
 
197
197
  - `Sashite::Sin.valid?(sin_string)` - Check if string is valid SIN notation
198
- - `Sashite::Sin.parse(sin_string)` - Parse SIN string into Style object
199
- - `Sashite::Sin.style(letter, side)` - Create style instance directly
198
+ - `Sashite::Sin.parse(sin_string)` - Parse SIN string into Identifier object
199
+ - `Sashite::Sin.identifier(letter, side)` - Create identifier instance directly
200
200
 
201
- ### Style Class
201
+ ### Identifier Class
202
202
 
203
203
  #### Creation and Parsing
204
- - `Sashite::Sin::Style.new(letter, side)` - Create style instance
205
- - `Sashite::Sin::Style.parse(sin_string)` - Parse SIN string
204
+ - `Sashite::Sin::Identifier.new(letter, side)` - Create identifier instance
205
+ - `Sashite::Sin::Identifier.parse(sin_string)` - Parse SIN string
206
206
 
207
207
  #### Attribute Access
208
208
  - `#letter` - Get style letter (symbol :A through :z)
@@ -210,25 +210,25 @@ makruk_black.to_s # => "m"
210
210
  - `#to_s` - Convert to SIN string representation
211
211
 
212
212
  #### Player Queries
213
- - `#first_player?` - Check if first player style
214
- - `#second_player?` - Check if second player style
213
+ - `#first_player?` - Check if first player identifier
214
+ - `#second_player?` - Check if second player identifier
215
215
 
216
216
  #### Transformations (immutable - return new instances)
217
217
  - `#flip` - Switch player assignment
218
- - `#with_letter(new_letter)` - Create style with different letter
219
- - `#with_side(new_side)` - Create style with different side
218
+ - `#with_letter(new_letter)` - Create identifier with different letter
219
+ - `#with_side(new_side)` - Create identifier with different side
220
220
 
221
221
  #### Comparison Methods
222
222
  - `#same_letter?(other)` - Check if same style letter (case-insensitive)
223
223
  - `#same_side?(other)` - Check if same player side
224
224
  - `#==(other)` - Full equality comparison
225
225
 
226
- ### Style Class Constants
226
+ ### Identifier Class Constants
227
227
 
228
- - `Sashite::Sin::Style::FIRST_PLAYER` - Symbol for first player (:first)
229
- - `Sashite::Sin::Style::SECOND_PLAYER` - Symbol for second player (:second)
230
- - `Sashite::Sin::Style::VALID_SIDES` - Array of valid sides
231
- - `Sashite::Sin::Style::SIN_PATTERN` - Regular expression for SIN validation
228
+ - `Sashite::Sin::Identifier::FIRST_PLAYER` - Symbol for first player (:first)
229
+ - `Sashite::Sin::Identifier::SECOND_PLAYER` - Symbol for second player (:second)
230
+ - `Sashite::Sin::Identifier::VALID_SIDES` - Array of valid sides
231
+ - `Sashite::Sin::Identifier::SIN_PATTERN` - Regular expression for SIN validation
232
232
 
233
233
  ## Advanced Usage
234
234
 
@@ -257,11 +257,11 @@ letter_a_first.same_side?(letter_a_second) # => false
257
257
 
258
258
  ```ruby
259
259
  # All transformations return new instances
260
- original = Sashite::Sin.style(:C, :first)
260
+ original = Sashite::Sin.identifier(:C, :first)
261
261
  flipped = original.flip
262
262
  changed_letter = original.with_letter(:S)
263
263
 
264
- # Original style is never modified
264
+ # Original identifier is never modified
265
265
  original.to_s # => "C" (unchanged)
266
266
  flipped.to_s # => "c"
267
267
  changed_letter.to_s # => "S"
@@ -293,7 +293,7 @@ Following the [Sashité Protocol](https://sashite.dev/protocol/):
293
293
  - **Rule-agnostic**: Independent of specific game mechanics
294
294
  - **Minimal overhead**: Single character per style-player combination
295
295
  - **Canonical representation**: Each style-player combination has exactly one SIN identifier
296
- - **Immutable**: All style instances are frozen and transformations return new objects
296
+ - **Immutable**: All identifier instances are frozen and transformations return new objects
297
297
  - **Functional**: Pure functions with no side effects
298
298
 
299
299
  ## Related Specifications
@@ -2,15 +2,15 @@
2
2
 
3
3
  module Sashite
4
4
  module Sin
5
- # Represents a style in SIN (Style Identifier Notation) format.
5
+ # Represents an identifier in SIN (Style Identifier Notation) format.
6
6
  #
7
- # A style consists of a single ASCII letter with case-based side encoding:
7
+ # An identifier consists of a single ASCII letter with case-based side encoding:
8
8
  # - Uppercase letter: first player (A, B, C, ..., Z)
9
9
  # - Lowercase letter: second player (a, b, c, ..., z)
10
10
  #
11
11
  # All instances are immutable - transformation methods return new instances.
12
12
  # This follows the SIN Specification v1.0.0 with Letter and Side attributes.
13
- class Style
13
+ class Identifier
14
14
  # SIN validation pattern matching the specification
15
15
  SIN_PATTERN = /\A[A-Za-z]\z/
16
16
 
@@ -32,7 +32,7 @@ module Sashite
32
32
  # @return [Symbol] the player side (:first or :second)
33
33
  attr_reader :side
34
34
 
35
- # Create a new style instance
35
+ # Create a new identifier instance
36
36
  #
37
37
  # @param letter [Symbol] style letter (single ASCII letter as symbol)
38
38
  # @param side [Symbol] player side (:first or :second)
@@ -47,26 +47,26 @@ module Sashite
47
47
  freeze
48
48
  end
49
49
 
50
- # Parse an SIN string into a Style object
50
+ # Parse an SIN string into an Identifier object
51
51
  #
52
52
  # @param sin_string [String] SIN notation string (single ASCII letter)
53
- # @return [Style] parsed style object with letter and inferred side
53
+ # @return [Identifier] parsed identifier object with letter and inferred side
54
54
  # @raise [ArgumentError] if the SIN string is invalid
55
55
  # @example Parse SIN strings with case-based side inference
56
- # Sashite::Sin::Style.parse("C") # => #<Sin::Style letter=:C side=:first>
57
- # Sashite::Sin::Style.parse("c") # => #<Sin::Style letter=:c side=:second>
58
- # Sashite::Sin::Style.parse("S") # => #<Sin::Style letter=:S side=:first>
56
+ # Sashite::Sin::Identifier.parse("C") # => #<Sin::Identifier letter=:C side=:first>
57
+ # Sashite::Sin::Identifier.parse("c") # => #<Sin::Identifier letter=:c side=:second>
58
+ # Sashite::Sin::Identifier.parse("S") # => #<Sin::Identifier letter=:S side=:first>
59
59
  def self.parse(sin_string)
60
60
  string_value = String(sin_string)
61
61
  validate_sin_string(string_value)
62
62
 
63
63
  # Determine side from case
64
- style_side = string_value == string_value.upcase ? FIRST_PLAYER : SECOND_PLAYER
64
+ identifier_side = string_value == string_value.upcase ? FIRST_PLAYER : SECOND_PLAYER
65
65
 
66
66
  # Use the letter directly as symbol
67
- style_letter = string_value.to_sym
67
+ identifier_letter = string_value.to_sym
68
68
 
69
- new(style_letter, style_side)
69
+ new(identifier_letter, identifier_side)
70
70
  end
71
71
 
72
72
  # Check if a string is a valid SIN notation
@@ -75,42 +75,42 @@ module Sashite
75
75
  # @return [Boolean] true if valid SIN, false otherwise
76
76
  #
77
77
  # @example Validate SIN strings
78
- # Sashite::Sin::Style.valid?("C") # => true
79
- # Sashite::Sin::Style.valid?("c") # => true
80
- # Sashite::Sin::Style.valid?("CHESS") # => false (multi-character)
78
+ # Sashite::Sin::Identifier.valid?("C") # => true
79
+ # Sashite::Sin::Identifier.valid?("c") # => true
80
+ # Sashite::Sin::Identifier.valid?("CHESS") # => false (multi-character)
81
81
  def self.valid?(sin_string)
82
82
  return false unless sin_string.is_a?(::String)
83
83
 
84
84
  sin_string.match?(SIN_PATTERN)
85
85
  end
86
86
 
87
- # Convert the style to its SIN string representation
87
+ # Convert the identifier to its SIN string representation
88
88
  #
89
89
  # @return [String] SIN notation string (single ASCII letter)
90
- # @example Display styles
91
- # style.to_s # => "C" (first player, C family)
92
- # style.to_s # => "c" (second player, C family)
93
- # style.to_s # => "S" (first player, S family)
90
+ # @example Display identifiers
91
+ # identifier.to_s # => "C" (first player, C family)
92
+ # identifier.to_s # => "c" (second player, C family)
93
+ # identifier.to_s # => "S" (first player, S family)
94
94
  def to_s
95
95
  letter.to_s
96
96
  end
97
97
 
98
- # Create a new style with opposite ownership (side)
98
+ # Create a new identifier with opposite ownership (side)
99
99
  #
100
- # @return [Style] new immutable style instance with flipped side
100
+ # @return [Identifier] new immutable identifier instance with flipped side
101
101
  # @example Flip player sides
102
- # style.flip # (:C, :first) => (:c, :second)
102
+ # identifier.flip # (:C, :first) => (:c, :second)
103
103
  def flip
104
104
  new_letter = first_player? ? letter.to_s.downcase.to_sym : letter.to_s.upcase.to_sym
105
105
  self.class.new(new_letter, opposite_side)
106
106
  end
107
107
 
108
- # Create a new style with a different letter (keeping same side)
108
+ # Create a new identifier with a different letter (keeping same side)
109
109
  #
110
110
  # @param new_letter [Symbol] new letter (single ASCII letter as symbol)
111
- # @return [Style] new immutable style instance with different letter
112
- # @example Change style letter
113
- # style.with_letter(:S) # (:C, :first) => (:S, :first)
111
+ # @return [Identifier] new immutable identifier instance with different letter
112
+ # @example Change identifier letter
113
+ # identifier.with_letter(:S) # (:C, :first) => (:S, :first)
114
114
  def with_letter(new_letter)
115
115
  self.class.validate_letter(new_letter)
116
116
  return self if letter == new_letter
@@ -120,12 +120,12 @@ module Sashite
120
120
  self.class.new(adjusted_letter, side)
121
121
  end
122
122
 
123
- # Create a new style with a different side (keeping same letter family)
123
+ # Create a new identifier with a different side (keeping same letter family)
124
124
  #
125
125
  # @param new_side [Symbol] :first or :second
126
- # @return [Style] new immutable style instance with different side
126
+ # @return [Identifier] new immutable identifier instance with different side
127
127
  # @example Change player side
128
- # style.with_side(:second) # (:C, :first) => (:c, :second)
128
+ # identifier.with_side(:second) # (:C, :first) => (:c, :second)
129
129
  def with_side(new_side)
130
130
  self.class.validate_side(new_side)
131
131
  return self if side == new_side
@@ -135,36 +135,36 @@ module Sashite
135
135
  self.class.new(new_letter, new_side)
136
136
  end
137
137
 
138
- # Check if the style belongs to the first player
138
+ # Check if the identifier belongs to the first player
139
139
  #
140
140
  # @return [Boolean] true if first player
141
141
  def first_player?
142
142
  side == FIRST_PLAYER
143
143
  end
144
144
 
145
- # Check if the style belongs to the second player
145
+ # Check if the identifier belongs to the second player
146
146
  #
147
147
  # @return [Boolean] true if second player
148
148
  def second_player?
149
149
  side == SECOND_PLAYER
150
150
  end
151
151
 
152
- # Check if this style has the same letter family as another
152
+ # Check if this identifier has the same letter family as another
153
153
  #
154
- # @param other [Style] style to compare with
155
- # @return [Boolean] true if both styles use the same letter family (case-insensitive)
156
- # @example Compare style letter families
157
- # c_style.same_letter?(C_style) # (:c, :second) and (:C, :first) => true
154
+ # @param other [Identifier] identifier to compare with
155
+ # @return [Boolean] true if both identifiers use the same letter family (case-insensitive)
156
+ # @example Compare identifier letter families
157
+ # c_identifier.same_letter?(C_identifier) # (:c, :second) and (:C, :first) => true
158
158
  def same_letter?(other)
159
159
  return false unless other.is_a?(self.class)
160
160
 
161
161
  letter.to_s.upcase == other.letter.to_s.upcase
162
162
  end
163
163
 
164
- # Check if this style belongs to the same side as another
164
+ # Check if this identifier belongs to the same side as another
165
165
  #
166
- # @param other [Style] style to compare with
167
- # @return [Boolean] true if both styles belong to the same side
166
+ # @param other [Identifier] identifier to compare with
167
+ # @return [Boolean] true if both identifiers belong to the same side
168
168
  def same_side?(other)
169
169
  return false unless other.is_a?(self.class)
170
170
 
@@ -174,7 +174,7 @@ module Sashite
174
174
  # Custom equality comparison
175
175
  #
176
176
  # @param other [Object] object to compare with
177
- # @return [Boolean] true if both objects are styles with identical letter and side
177
+ # @return [Boolean] true if both objects are identifiers with identical letter and side
178
178
  def ==(other)
179
179
  return false unless other.is_a?(self.class)
180
180
 
data/lib/sashite/sin.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "sin/style"
3
+ require_relative "sin/identifier"
4
4
 
5
5
  module Sashite
6
6
  # SIN (Style Identifier Notation) implementation for Ruby
@@ -20,7 +20,7 @@ module Sashite
20
20
  # "S" - First player, S style family
21
21
  # "s" - Second player, S style family
22
22
  #
23
- # See: https://sashite.dev/specs/sin/1.0.0/
23
+ # @see https://sashite.dev/specs/sin/1.0.0/
24
24
  module Sin
25
25
  # Check if a string is a valid SIN notation
26
26
  #
@@ -33,33 +33,33 @@ module Sashite
33
33
  # Sashite::Sin.valid?("CHESS") # => false (multi-character)
34
34
  # Sashite::Sin.valid?("1") # => false (not a letter)
35
35
  def self.valid?(sin_string)
36
- Style.valid?(sin_string)
36
+ Identifier.valid?(sin_string)
37
37
  end
38
38
 
39
- # Parse an SIN string into a Style object
39
+ # Parse an SIN string into an Identifier object
40
40
  #
41
41
  # @param sin_string [String] SIN notation string
42
- # @return [Sin::Style] parsed style object with letter and side attributes
42
+ # @return [Sin::Identifier] parsed identifier object with letter and side attributes
43
43
  # @raise [ArgumentError] if the SIN string is invalid
44
44
  # @example Parse different SIN formats
45
- # Sashite::Sin.parse("C") # => #<Sin::Style letter=:C side=:first>
46
- # Sashite::Sin.parse("c") # => #<Sin::Style letter=:c side=:second>
47
- # Sashite::Sin.parse("S") # => #<Sin::Style letter=:S side=:first>
45
+ # Sashite::Sin.parse("C") # => #<Sin::Identifier letter=:C side=:first>
46
+ # Sashite::Sin.parse("c") # => #<Sin::Identifier letter=:c side=:second>
47
+ # Sashite::Sin.parse("S") # => #<Sin::Identifier letter=:S side=:first>
48
48
  def self.parse(sin_string)
49
- Style.parse(sin_string)
49
+ Identifier.parse(sin_string)
50
50
  end
51
51
 
52
- # Create a new style instance
52
+ # Create a new identifier instance
53
53
  #
54
54
  # @param letter [Symbol] style letter (single ASCII letter as symbol)
55
55
  # @param side [Symbol] player side (:first or :second)
56
- # @return [Sin::Style] new immutable style instance
56
+ # @return [Sin::Identifier] new immutable identifier instance
57
57
  # @raise [ArgumentError] if parameters are invalid
58
- # @example Create styles directly
59
- # Sashite::Sin.style(:C, :first) # => #<Sin::Style letter=:C side=:first>
60
- # Sashite::Sin.style(:s, :second) # => #<Sin::Style letter=:s side=:second>
61
- def self.style(letter, side)
62
- Style.new(letter, side)
58
+ # @example Create identifiers directly
59
+ # Sashite::Sin.identifier(:C, :first) # => #<Sin::Identifier letter=:C side=:first>
60
+ # Sashite::Sin.identifier(:s, :second) # => #<Sin::Identifier letter=:s side=:second>
61
+ def self.identifier(letter, side)
62
+ Identifier.new(letter, side)
63
63
  end
64
64
  end
65
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sashite-sin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
@@ -12,11 +12,11 @@ dependencies: []
12
12
  description: |
13
13
  SIN (Style Identifier Notation) provides a rule-agnostic format for identifying styles
14
14
  in abstract strategy board games. This gem implements the SIN Specification v1.0.0 with
15
- a modern Ruby interface featuring immutable style objects and functional programming
15
+ a modern Ruby interface featuring immutable identifier objects and functional programming
16
16
  principles. SIN uses single ASCII letters with case-based side encoding (A-Z for first player,
17
17
  a-z for second player), enabling clear distinction between different style families in
18
18
  multi-style gaming environments. Perfect for cross-style matches, game engines, and hybrid
19
- gaming systems requiring compact style identification.
19
+ gaming systems requiring compact style identification with enhanced collision resolution.
20
20
  email: contact@cyril.email
21
21
  executables: []
22
22
  extensions: []
@@ -26,7 +26,7 @@ files:
26
26
  - README.md
27
27
  - lib/sashite-sin.rb
28
28
  - lib/sashite/sin.rb
29
- - lib/sashite/sin/style.rb
29
+ - lib/sashite/sin/identifier.rb
30
30
  homepage: https://github.com/sashite/sin.rb
31
31
  licenses:
32
32
  - MIT
@@ -53,6 +53,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  requirements: []
54
54
  rubygems_version: 3.6.9
55
55
  specification_version: 4
56
- summary: SIN (Style Identifier Notation) implementation for Ruby with immutable style
56
+ summary: SIN (Style Identifier Notation) implementation for Ruby with immutable identifier
57
57
  objects
58
58
  test_files: []