|
|
@ -59,8 +59,11 @@ class SpriteMoople : SKNode {
|
|
|
|
let posX = Int(round((localisation.x - (-400)) / 100))
|
|
|
|
let posX = Int(round((localisation.x - (-400)) / 100))
|
|
|
|
let posY = Int(round((localisation.y - (-300)) / 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)
|
|
|
|
self.cellPosition = CGPoint(x: posX, y: posY)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Faire un retour en arrière si lastMove != nil
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|