Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
gnome-games
glchess-engines.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File glchess-engines.patch of Package gnome-games
From 4f6efed734470eddd3e620933a6711c582028da4 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger <dimstar@opensuse.org> Date: Fri, 18 May 2012 22:15:39 +0200 Subject: [PATCH] glchess: fix phalanx/gnuchess output interpretation. Bug 675434 --- glchess/src/chess-engine-cecp.vala | 4 ++-- glchess/src/chess-game.vala | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glchess/src/chess-engine-cecp.vala b/glchess/src/chess-engine-cecp.vala index cb40419..4a7aff5 100644 --- a/glchess/src/chess-engine-cecp.vala +++ b/glchess/src/chess-engine-cecp.vala @@ -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()); } } diff --git a/glchess/src/chess-game.vala b/glchess/src/chess-game.vala index 3c5ebce..ecd8b83 100644 --- a/glchess/src/chess-game.vala +++ b/glchess/src/chess-game.vala @@ -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') { -- 1.7.9.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor