From 32f7516c5aa65cbba73dec61631236e1cee2762e Mon Sep 17 00:00:00 2001 From: Lucas DUFLOT Date: Mon, 3 Jun 2024 11:22:08 +0200 Subject: [PATCH] fixe bug --- source/Trek-12/Models/Game/Game.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Trek-12/Models/Game/Game.cs b/source/Trek-12/Models/Game/Game.cs index 6c732ff..851625a 100644 --- a/source/Trek-12/Models/Game/Game.cs +++ b/source/Trek-12/Models/Game/Game.cs @@ -185,7 +185,7 @@ namespace Models.Game if (UsedMap.Boards[i].Value != null) return false; UsedMap.Boards[i].Value = result; - BoardUpdated?.Invoke(this, new BoardsUpdateEventArgs(UsedMap.Boards)); + BoardUpdated?.Invoke(this, new BoardsUpdateEventArgs(UsedMap.Boards.ToList())); return true; } } @@ -281,7 +281,7 @@ namespace Models.Game foreach(var cells in UsedMap.Boards) { GameRules.IsZoneValidAndAddToZones(cells, UsedMap); - AddToRopePath(cells, GameRules.EveryAdjacentCells(cells, UsedMap.Boards)); + AddToRopePath(cells, GameRules.EveryAdjacentCells(cells, UsedMap.Boards.ToList())); } int? points = GameRules.FinalCalculusOfZones(UsedMap.Zones); for (int i = 0; i < UsedMap.RopePaths.Count; i++)