[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Bug-gnubg] Import of .gam files
From: |
Ian Shaw |
Subject: |
RE: [Bug-gnubg] Import of .gam files |
Date: |
Wed, 14 Jun 2006 12:59:08 +0100 |
From: Jonathan Kinsey on 14 June 2006 09:00
>
> I think they produce .mat files now - at least they did when
> I tried it recently (if it was the same site...).
>
Only matches produce .mat files.
Single games produce .gam files.
Gnubg fails to import these because:
A) Gnubg expects the line
n point match
Where n is the match lenth and "0" is a money game.
It ought to be be possible to assume 0 if this line is not found.
B) Gnubg expects the player names to be punctuated:
Player0 : points Player1 : points
The game format only has:
Player0 Player1
The routine searches for the : and fails.
I think the solution would be to look for a big bunch of White space if the
search for a : fails, and to assume the score is 0 - 0.
C) GE ends each gaem file with the text
Wins 1 point and the match
The import works fine if you strip " and the match", so it should be fairly
simple to ignore it.
I had a look at fixing it. It was too hard for me, but I would guess fairly
trivial to a C programmer.
Maybe the correct approach is to set default data at the start of the routine,
e.g. names are Player0 and Player1, the score is 0 - 0 in a money game.
-- Ian