[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bknights/2=2E3=5D_src/rules=3A_Remove_the_captured_p?=
From: Miha Čančula <miha.cancula () gmail ! com>
Date: 2011-03-18 9:49:40
Message-ID: 20110318094940.21BD8A60B0 () git ! kde ! org
[Download RAW message or body]
Git commit 02d4de25e8545fa0c4d51d84e392196a8c751677 by Miha Čančula.
Committed on 15/03/2011 at 22:28.
Pushed by mihac into branch '2.3'.
Remove the captured pawn after en-passant.
M +1 -1 src/rules/chessrules.cpp
http://commits.kde.org/knights/02d4de25e8545fa0c4d51d84e392196a8c751677
diff --git a/src/rules/chessrules.cpp b/src/rules/chessrules.cpp
index 98faa76..d68280c 100644
--- a/src/rules/chessrules.cpp
+++ b/src/rules/chessrules.cpp
@@ -491,7 +491,7 @@ void ChessRules::checkSpecialFlags ( Move* move, Color color )
move->setFlag ( Move::EnPassant, true );
Pos capturedPos = move->from() + Pos ( delta.first, 0 );
Piece* p = m_grid->value ( capturedPos );
- move->addRemovedPiece ( move->to(), qMakePair ( p->color(), p->pieceType() ) );
+ move->addRemovedPiece ( capturedPos, qMakePair ( p->color(), p->pieceType() ) );
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic