Dumb File Format Of The Day

Simon on 2002-06-08T15:31:24

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.


I'm mistaken

Simon on 2002-06-10T15:00:30

OK, so it doesn't skip over 'i'. I have no idea what's going on.