From 828c912aa470be40c05ad12680d57a4e5458430c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 29 Dec 2023 02:09:16 +0100 Subject: [PATCH] =?UTF-8?q?d=C3=A9placement=20d'une=20piece?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Butin/Butin.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Butin/Butin.cpp b/src/Butin/Butin.cpp index 7ee7792..81af5df 100644 --- a/src/Butin/Butin.cpp +++ b/src/Butin/Butin.cpp @@ -107,7 +107,15 @@ void Butin::event(const int x, const int y) { } case EnJeu: { // TODO + Piece *p = getPiece(posCurseur.first, posCurseur.second); plateau.modifierSelection(posCurseur.first, posCurseur.second); + if (p == nullptr) { + // TODO - Si le coup est faisable + if (true) { + plateau.moveSelection(posCurseur.first, posCurseur.second); + } + } + break; } case Fini: {