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 73eb905..37926b1 100644 Binary files a/NE_PAS_TOUCHER/.DS_Store and b/NE_PAS_TOUCHER/.DS_Store differ