Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Simon (89)

AOL IM: lathosjp (Add Buddy, Send Message)

Busy Man.

Journal of Simon (89)

Saturday June 08, 2002
10:31 AM

Dumb File Format Of The Day

[ #5506 ]
Smart Game Format.

Actually, it's reasonably sane on the whole - it uses s-expressions to represent variations, and it's trivial to parse. Indeed, it's what Games::Goban will speak natively.

But I couldn't work out why I was getting weird off-by-one errors in some parts of my display code; indeed, everything outside the upper-left quadrant of the board. Then I worked it out.

This supposedly for-machine-consumption file format uses a pair of characters from 'a' to 't' to represent co-ordinates on a 19x19 board. The more alert of you will notice that 't' is not the 19th letter of the alphabet, but the 20th. That's right - it actually skips over 'i'.

Working around this makes the code messy; I think I should ditch the idea of storing the native co-ordinates, which would have been very nice, and use numerical co-ordinates instead. Ho hum.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.