Чистка пустых строк
This commit is contained in:
parent
fea88d309c
commit
5189f14b0e
@ -11,4 +11,4 @@ public enum DirectionType
|
|||||||
Down = 2,//Вниз
|
Down = 2,//Вниз
|
||||||
Right = 3,//Вправо
|
Right = 3,//Вправо
|
||||||
Left = 4 //Влево
|
Left = 4 //Влево
|
||||||
}
|
}
|
@ -13,7 +13,7 @@ public class DrawningBattleship : DrawningShip
|
|||||||
/// Конструктор
|
/// Конструктор
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="entityBattleship">объект класса-сущности</param>
|
/// <param name="entityBattleship">объект класса-сущности</param>
|
||||||
public DrawningBattleship(EntityBattleship entityBattleship)
|
public DrawningBattleship(EntityBattleship entityBattleship) : base(143, 75)
|
||||||
{
|
{
|
||||||
EntityShip = entityBattleship;
|
EntityShip = entityBattleship;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Battleship.Drawnings;
|
namespace Battleship.Drawnings;
|
||||||
public class DrawningShip
|
public class DrawningShip
|
||||||
{
|
{
|
||||||
@ -145,5 +144,4 @@ public class DrawningShip
|
|||||||
g.FillRectangle(brBlack, _startX.Value, _startY.Value + 35, 3, 15);
|
g.FillRectangle(brBlack, _startX.Value, _startY.Value + 35, 3, 15);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,6 @@ using System.Linq;
|
|||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Battleship.Entities;
|
namespace Battleship.Entities;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Класс-сущность "Корабль"
|
/// Класс-сущность "Корабль"
|
||||||
@ -26,5 +25,4 @@ public class EntityShip
|
|||||||
Weight = weight;
|
Weight = weight;
|
||||||
BodyColor = bodycolor;
|
BodyColor = bodycolor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -100,4 +100,4 @@ public abstract class AbstractStrategy
|
|||||||
return false;
|
return false;
|
||||||
return _moveableObject?.TryMoveObject(movementDirection) ?? false;
|
return _moveableObject?.TryMoveObject(movementDirection) ?? false;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -23,4 +23,4 @@ public interface IMoveableObject
|
|||||||
/// <param name="direction">Направление</param>
|
/// <param name="direction">Направление</param>
|
||||||
/// <returns>true - успех перемещения, false - неудача перемещения</returns>
|
/// <returns>true - успех перемещения, false - неудача перемещения</returns>
|
||||||
bool TryMoveObject(MovementDirection direction);
|
bool TryMoveObject(MovementDirection direction);
|
||||||
}
|
}
|
@ -34,4 +34,4 @@ public class MoveToBorder : AbstractStrategy
|
|||||||
MoveDown();
|
MoveDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -37,4 +37,4 @@ public class MoveToCenter : AbstractStrategy
|
|||||||
MoveDown();
|
MoveDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -51,4 +51,4 @@ public class MoveableShip : IMoveableObject
|
|||||||
_ => DirectionType.Unknown,
|
_ => DirectionType.Unknown,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -25,4 +25,4 @@ public enum MovementDirection
|
|||||||
/// Влево
|
/// Влево
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Left = 4
|
Left = 4
|
||||||
}
|
}
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Battleship.MovementStrategy;
|
namespace Battleship.MovementStrategy;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Параметры-координаты объекта
|
/// Параметры-координаты объекта
|
||||||
@ -34,4 +33,4 @@ public class ObjectParameters
|
|||||||
_width = width;
|
_width = width;
|
||||||
_height = height;
|
_height = height;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Battleship.MovementStrategy;
|
namespace Battleship.MovementStrategy;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Статус выполнения операции пермещения
|
/// Статус выполнения операции пермещения
|
||||||
@ -22,4 +21,4 @@ public enum StrategyStatus
|
|||||||
/// Выполнено
|
/// Выполнено
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Finish
|
Finish
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user