From 3bec014a331152b111b4eecb4864ba26d2ab9ae3 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 10 Jan 2023 17:18:40 +0100 Subject: Update chessarbiter and finish the implementation of pawns promotions --- src/game_tab/Game.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game_tab/Game.cpp') diff --git a/src/game_tab/Game.cpp b/src/game_tab/Game.cpp index def179c..315a4de 100644 --- a/src/game_tab/Game.cpp +++ b/src/game_tab/Game.cpp @@ -100,6 +100,12 @@ bool Game::IsCheckmate(bool forBlack){ return !arbiter.IsBlackTurn() && arbiter.IsCheckMate(); } +bool Game::IsPromotionMove(std::string absolute_move){ + arbiter.Setup(GetFen()); + arbiter.Play(absolute_move); + return(arbiter.WasPawnPromotion()); +} + bool Game::Play(std::string move,char promotion) { wxLogDebug("Playing move %s", move); std::string fen = GetFen(); -- cgit v1.2.3