diff --git a/ProjectBoat_base/ProjectBoat_bae/BoatDelegate.cs b/ProjectBoat_base/ProjectBoat_bae/BoatDelegate.cs deleted file mode 100644 index 4e32984..0000000 --- a/ProjectBoat_base/ProjectBoat_bae/BoatDelegate.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ProjectBoat_bae.DrawningObjects; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ProjectBoat_bae -{ - internal class BoatDelegate - { - // Делегат для передачи объекта - public delegate void boatDelegate(Drawningboat boat); - } -} diff --git a/ProjectBoat_base/ProjectBoat_bae/DrawningObjects/DrawningBoat.cs b/ProjectBoat_base/ProjectBoat_bae/DrawningObjects/DrawningBoat.cs index 64bab71..30bcdb6 100644 --- a/ProjectBoat_base/ProjectBoat_bae/DrawningObjects/DrawningBoat.cs +++ b/ProjectBoat_base/ProjectBoat_bae/DrawningObjects/DrawningBoat.cs @@ -74,13 +74,13 @@ namespace ProjectBoat_bae.DrawningObjects // Установка позиции public void SetPosition(int x, int y) { - if (x < 0 || x + _boatWidth > _pictureWidth + 90) + if (x < 0 || x + _boatWidth > _pictureWidth) { - x = Math.Max(0, _pictureWidth - _boatWidth); + x = Math.Max(0, _pictureWidth - _boatWidth + 90); } - if (y < 0 || y + _boatHeight > _pictureHeight + 60) + if (y < 0 || y + _boatHeight > _pictureHeight) { - y = Math.Max(0, _pictureHeight - _boatHeight); + y = Math.Max(0, _pictureHeight - _boatHeight+ 90); } _startPosX = x; _startPosY = y;