Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added some time settings parsing

  • Loading branch information...
commit 4796ed5b068e9f408a634e1837dd3917be2a4dc8 1 parent cf8c937
Gabriel authored
View
2  misc/lib/sgf.rb
@@ -66,7 +66,7 @@ def load_from_string(input)
:komi => "KM", :date => "DT", :result => "RE",
:file_format => "FF", :black_country => "BC",
:white_country => "WC", :event => "EV", :source => "SO",
- :encoding => "CA", :size => "SZ"}
+ :encoding => "CA", :size => "SZ", :rules => "RU", :time_set => "OT"}
def metadata(symbol)
return @metadata if symbol == :all
View
2  misc/mocks/mock.sgf
@@ -1 +1 @@
-(;FF[4]GM[1]SZ[19]CA[UTF-8]SO[gokifu.com]BC[kr]WC[kr]EV[7th Korean Wonik Cup Siptan]PB[Ryu Chaehyeong]BR[9p]PW[Kang Dongyun]WR[9p]KM[6.5]DT[2011-09-30]RE[W+R];B[qd];W[pp])
+(;FF[4]RU[Japanese]TM[1500]OT[5x30 byo-yomi]GM[1]SZ[19]CA[UTF-8]SO[gokifu.com]BC[kr]WC[kr]EV[7th Korean Wonik Cup Siptan]PB[Ryu Chaehyeong]BR[9p]PW[Kang Dongyun]WR[9p]KM[6.5]DT[2011-09-30]RE[W+R];B[qd];W[pp])
View
3  misc/tests/sgf_test.rb
@@ -120,6 +120,9 @@
assert_equal sgf.metadata(:encoding), "UTF-8"
assert_equal sgf.metadata(:size), "19"
assert_equal sgf.metadata(:event), "7th Korean Wonik Cup Siptan"
+ assert_equal sgf.metadata(:rules), "Japanese"
+ assert_equal sgf.metadata(:time_set), "5x30 byo-yomi"
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.