diff --git a/Boats/Boats/MapWithSetBoatsGeneric.cs b/Boats/Boats/MapWithSetBoatsGeneric.cs index 9d7e474..9c989cd 100644 --- a/Boats/Boats/MapWithSetBoatsGeneric.cs +++ b/Boats/Boats/MapWithSetBoatsGeneric.cs @@ -91,7 +91,6 @@ namespace Boats Bitmap bmp = new(_pictureWidth, _pictureHeight); Graphics g = Graphics.FromImage(bmp); DrawBackground(g); - Shaking(); DrawBoats(g); return bmp; } @@ -136,8 +135,8 @@ namespace Boats var boat = _setBoats[j]; if (boat != null) { - boat = _setBoats.Remove(j); _setBoats.Insert(boat, i); + _setBoats.Remove(j); break; } } diff --git a/Boats/Boats/SetBoatsGeneric.cs b/Boats/Boats/SetBoatsGeneric.cs index c1d5002..5f92cb4 100644 --- a/Boats/Boats/SetBoatsGeneric.cs +++ b/Boats/Boats/SetBoatsGeneric.cs @@ -74,8 +74,7 @@ namespace Boats if (Count == 0 || position < 0 || position >= _maxCount || _places[position] == null) throw new BoatNotFoundException(position); T boat = _places[position]; - - _places[position] = null; + _places.RemoveAt(position); return boat; } public T this[int position]