From 2c91561d82325c092560555b9ff3f79547fc9dd3 Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Sat, 11 Aug 2007 13:36:10 +0200 Subject: [PATCH] Fixed bug #40. --- src/hlvariant/chess/serializer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hlvariant/chess/serializer.h b/src/hlvariant/chess/serializer.h index 1c4f46a..9f424b0 100644 --- a/src/hlvariant/chess/serializer.h +++ b/src/hlvariant/chess/serializer.h @@ -301,6 +301,7 @@ QChar Serializer::symbol(typename Piece::Type type) const { template typename Serializer::Move Serializer::parse_ics_verbose(const QString& str, const GameState& ref) { + // here ref is the position _after_ this move ICSVerbose verbose; verbose.load(str, ref.board().size().y); @@ -312,7 +313,7 @@ Serializer::parse_ics_verbose(const QString& str, const GameState to = verbose.to; } else { - from = ref.kingStartingPosition(ref.turn()); + from = ref.kingStartingPosition(ref.previousTurn()); to = from + (verbose.castling == SAN::KingSide ? Point(2,0) : Point(-2, 0)); } -- 2.11.4.GIT