From b9aa1085df08c4a8901ca0433de25a170b33e6d6 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 10 Jan 2023 16:01:26 +0100 Subject: Improve pawn promotion code --- src/game_tab/Game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game_tab/Game.cpp') 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 != ' ') { -- cgit v1.2.3