From 0acd544cb0af50c6571360ec0b773bcac4b78c94 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 4 Jun 2024 15:40:35 +0200 Subject: [PATCH] f --- .../ArkitDoushiQi/Game/GameScene.swift | 3 ++- .../Game/SKNodes/SpriteMoople.swift | 5 ++++- NE_PAS_TOUCHER/.DS_Store | Bin 6148 -> 6148 bytes 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ArkitDoushiQi/ArkitDoushiQi/Game/GameScene.swift b/ArkitDoushiQi/ArkitDoushiQi/Game/GameScene.swift index 21b9bbe..b20d5ca 100644 --- a/ArkitDoushiQi/ArkitDoushiQi/Game/GameScene.swift +++ b/ArkitDoushiQi/ArkitDoushiQi/Game/GameScene.swift @@ -70,8 +70,9 @@ class GameScene : SKScene { func humanChoseMove(player:HumanPlayer){ + while ( GameScene.lastMove == nil ) { } - return Move(of: player.id, fromRow: <#T##Int#>, andFromColumn: <#T##Int#>, toRow: <#T##Int#>, andToColumn: <#T##Int#>) + //return Move(of: player.id, fromRow: <#T##Int#>, andFromColumn: <#T##Int#>, toRow: <#T##Int#>, andToColumn: <#T##Int#>) } } diff --git a/ArkitDoushiQi/ArkitDoushiQi/Game/SKNodes/SpriteMoople.swift b/ArkitDoushiQi/ArkitDoushiQi/Game/SKNodes/SpriteMoople.swift index 88c7dc3..0c98110 100644 --- a/ArkitDoushiQi/ArkitDoushiQi/Game/SKNodes/SpriteMoople.swift +++ b/ArkitDoushiQi/ArkitDoushiQi/Game/SKNodes/SpriteMoople.swift @@ -59,8 +59,11 @@ class SpriteMoople : SKNode { let posX = Int(round((localisation.x - (-400)) / 100)) let posY = Int(round((localisation.y - (-300)) / 100)) - //GameScene.lastMove = Move(of:owner, fromRow:Int(self.cellPosition.x),andFromColumn:Int(self.cellPosition.y),toRow:posX, andToColumn:posY) + GameScene.lastMove = Move(of:.noOne, fromRow:Int(self.cellPosition.x),andFromColumn:Int(self.cellPosition.y),toRow:posX, andToColumn:posY) self.cellPosition = CGPoint(x: posX, y: posY) + + // Faire un retour en arrière si lastMove != nil + return } } diff --git a/NE_PAS_TOUCHER/.DS_Store b/NE_PAS_TOUCHER/.DS_Store index 73eb90511f3628db73f9d05bcf3ad9e1924b0862..37926b1f5e2b13f24fdf51feac72c9857dd0482c 100644 GIT binary patch delta 287 zcmZoMXfc=|#>B)qu~2NHo+2aj!~pA!4;mPOj2_2{{qprm<;4X_Ir&Kp3=G?o3UV@w zOAHLIF)}f;u(Gjpuyb&8#0F>Nmj{<5mXsDdB^E`4cp>@uIY}^fVp3RUYI(eXh;x2k zNn&PRY7tmNW=bkhNlbWVUP^wsQ+{b)N-CJ*u~2NHo+2aT!~knX#>x83N|W`N