Example: require ‘sgfparser’ tree = SGF::Tree.new :filename => File tree = SGF::Tree.new :sgf_string => String
Should work with all FF4 files (in fact, all SGF files, but did not test any files with a format pre-FF4). Should also work with Ruby from 1.8.6 and up, though untested with anything earlier than 1.8.7.
The ‘SGF Indenter’, the purpose of which is to make the actual SGF file more human readable, is working.
Files can be saved. There is an error in the saving test, which I don’t understand, but… It’s working as far as I can tell. I need to write more detailed tests, I think.
_
TODO ? Create a “Game” class, and if a whole set of () exists, then I have a game? That way maybe I can easily go to multiple games stored in a single SGF file? Mostly syntactic sugar, but may be worth implementing.