glchess: fix phalanx/gnuchess output interpretation. Bug 675434
This commit is contained in:
parent
d135b2eab9
commit
5831d0b982
2 changed files with 3 additions and 3 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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')
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue