From 949cbd7fcab6f478ad2a6696075306c9ccc54aff Mon Sep 17 00:00:00 2001 From: Alexis Drai Date: Wed, 8 Feb 2023 12:35:43 +0100 Subject: [PATCH] :recycle: Make victory tiles non optional (in case of victory) --- .../Sources/connect4_lib/rules/IRules.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Connect4/connect4_lib/Sources/connect4_lib/rules/IRules.swift b/Connect4/connect4_lib/Sources/connect4_lib/rules/IRules.swift index 6aaf590..b08e2f5 100644 --- a/Connect4/connect4_lib/Sources/connect4_lib/rules/IRules.swift +++ b/Connect4/connect4_lib/Sources/connect4_lib/rules/IRules.swift @@ -41,13 +41,13 @@ public enum Result : Equatable { switch rhs { case .won(let rPlayerId, let rVictoryTiles) : - if (lPlayerId != rPlayerId || lVictoryTiles == nil || rVictoryTiles == nil) { + if (lPlayerId != rPlayerId) { return false } - for n in 0..