Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Request for code critique: SGF parser

Status
Not open for further replies.

Trevoke

Programmer
Jun 6, 2002
1,142
US
SGF is the Smart Game Format, best used for storing go game records (though it'd work also for chess, or backgammon, etc).

I'm developing a library to handle that format. Right now it only parses the files, but I am working on making it a paradigm of Ruby code. I've got some basic Cucumber testing in there, etc etc.
Basically, the SGF format is a game tree that supports variations - so I implemented a linked list, which is not particularly ruby-ish, but I had no better ideas. Can anybody recommend something more Rubyish? Is my code readable? It could probably use more / better comments.. What do you think?

(it's under 'lib').
Thanks in advance for your time :)

Tao Te Ching Discussions : Chapter 9 (includes links to previous chapters)
What is the nature of conflict?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top