From 6dbd0832d8740a128fa44eb7883bd8e6ef496f58 Mon Sep 17 00:00:00 2001 From: kaznacheeva Date: Wed, 15 Nov 2023 12:14:21 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Battleship/Battleship/SetGeneric.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Battleship/Battleship/SetGeneric.cs b/Battleship/Battleship/SetGeneric.cs index c0e3858..7542dea 100644 --- a/Battleship/Battleship/SetGeneric.cs +++ b/Battleship/Battleship/SetGeneric.cs @@ -72,7 +72,9 @@ namespace Battleship.Generics yield return _places[i]; if (maxShips.HasValue && i == maxShips.Value) { + yield break; + } } }