From ac945d08fd59c2a5cb03882ebe219820b70e3d64 Mon Sep 17 00:00:00 2001 From: louis Date: Mon, 12 Feb 2024 10:55:10 +0100 Subject: [PATCH] Fix(master): bug de condition de victoire --- Model/Sources/Model/VerySimpleRules.swift | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Model/Sources/Model/VerySimpleRules.swift b/Model/Sources/Model/VerySimpleRules.swift index 7a8d939..2becd4e 100644 --- a/Model/Sources/Model/VerySimpleRules.swift +++ b/Model/Sources/Model/VerySimpleRules.swift @@ -218,13 +218,6 @@ public struct VerySimpleRules: Rules { return (true, .winner(lastMove.owner, .denReached)) } - // Vérifie si l'un des joueurs a atteint la tanière de l'adversaire - let player1ReachedOpponentDen = board.grid[0][4].piece?.owner == .player1 - let player2ReachedOpponentDen = board.grid[4][0].piece?.owner == .player2 - if player1ReachedOpponentDen || player2ReachedOpponentDen { - return (true, .winner(player1ReachedOpponentDen ? .player1 : .player2, .denReached)) - } - // Vérifie si l'un des joueurs n'a plus de pièces if hasPlayerNoPieces(board: board, player: opponent) { return (true, .winner(lastMove.owner, .noMorePieces))