glchess: fix phalanx/gnuchess output interpretation. Bug 675434

This commit is contained in:
Dominique Leuenberger 2012-05-18 22:15:39 +02:00 committed by Robert Ancell
parent d135b2eab9
commit 5831d0b982
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ public class ChessEngineCECP : ChessEngine
debug ("Read from engine: '%s'", line);
string[] move_prefixes = { "My move is: ", "my move is ", "move " };
string[] move_prefixes = { "My move is: ", "My move is : ", "my move is ", "move " };
foreach (string prefix in move_prefixes)
{
if (line.has_prefix (prefix))
@ -48,7 +48,7 @@ public class ChessEngineCECP : ChessEngine
string move = line[prefix.length:line.length];
debug ("Engine moves %s", move);
moving = true;
moved (move);
moved (move.strip());
}
}

View file

@ -1027,7 +1027,7 @@ public class ChessState
r1 = (int) (move[i] - '1');
i++;
}
if (move[i] == 'x')
if (move[i] == 'x' || move[i] == '-')
i++;
if (move[i] >= 'a' && move[i] <= 'h')
{