kayabot 0.1.4 → 0.1.6
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.
- data/kayabot.gemspec +1 -1
- data/lib/gg.rb +6 -4
- metadata +1 -1
data/kayabot.gemspec
CHANGED
data/lib/gg.rb
CHANGED
@@ -130,9 +130,11 @@ def convert_move(move, size=19)
|
|
130
130
|
elsif move == "resign"
|
131
131
|
return 'resign'
|
132
132
|
else
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
133
|
+
|
134
|
+
alphabet = "ABCDEFGHIJKLMNOPQRS"[0..size.to_i - 1]
|
135
|
+
|
136
|
+
sgf_alphabet = "ABCDEFGHJKLMNOPQRST"[0..size.to_i - 1]
|
137
|
+
|
138
|
+
return alphabet["ABCDEFGHJKLMNOPQRST".index(move[0])].downcase + alphabet.reverse[(move[1].to_s + move[2].to_s).to_i - 1].downcase
|
137
139
|
end
|
138
140
|
end
|