Permalink
Browse files

added some time settings parsing

  • Loading branch information...
1 parent cf8c937 commit 4796ed5b068e9f408a634e1837dd3917be2a4dc8 Gabriel committed Dec 2, 2011
Showing with 5 additions and 2 deletions.
  1. +1 −1 misc/lib/sgf.rb
  2. +1 −1 misc/mocks/mock.sgf
  3. +3 −0 misc/tests/sgf_test.rb
View
@@ -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
@@ -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])
@@ -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

0 comments on commit 4796ed5

Please sign in to comment.