aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/Game.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-10 16:01:26 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-10 16:01:26 +0100
commitb9aa1085df08c4a8901ca0433de25a170b33e6d6 (patch)
tree72034a2ff87c3187529a0dc6ffdece212b6134a6 /src/game_tab/Game.cpp
parent840e68807cfbb23fcc2718496d07a6d3ec5fc8ed (diff)
Improve pawn promotion code
Diffstat (limited to 'src/game_tab/Game.cpp')
-rw-r--r--src/game_tab/Game.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game_tab/Game.cpp b/src/game_tab/Game.cpp
index 53be08f..def179c 100644
--- a/src/game_tab/Game.cpp
+++ b/src/game_tab/Game.cpp
@@ -100,11 +100,11 @@ bool Game::IsCheckmate(bool forBlack){
return !arbiter.IsBlackTurn() && arbiter.IsCheckMate();
}
-bool Game::Play(std::string move) {
+bool Game::Play(std::string move,char promotion) {
wxLogDebug("Playing move %s", move);
std::string fen = GetFen();
arbiter.Setup(fen);
- if (arbiter.Play(move)) {
+ if (arbiter.Play(move,promotion)) {
HalfMove *m = new HalfMove(move, arbiter.GetSAN(), arbiter.GetFEN());
char capture = arbiter.GetCapture();
if (capture != ' ') {