PIbd-21_MalafeevL.S._Cruise.../Cruiser/Entities/EntityCruiser.cs

47 lines
1.4 KiB
C#
Raw Permalink Normal View History

2023-09-25 11:15:05 +04:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2023-09-25 14:09:42 +04:00
namespace Cruiser.Entities
2023-09-25 11:15:05 +04:00
{
2023-09-25 14:09:42 +04:00
/// <summary>
/// Класс-сущность "Крейсер"
/// </summary>
2023-09-25 11:15:05 +04:00
public class EntityCruiser
{
/// <summary>
/// Скорость
/// </summary>
public int Speed { get; private set; }
/// <summary>
/// Вес
/// </summary>
public double Weight { get; private set; }
/// <summary>
/// Основной цвет
/// </summary>
public Color BodyColor { get; private set; }
/// <summary>
/// Второстепенный цвет
/// </summary>
public Color SecondColor { get; private set; }
/// <summary>
/// Шаг перемещения Крейсера
/// </summary>
public double Step => (double)Speed * 100 / Weight;
/// <param name="speed">Скорость</param>
/// <param name="weight">Вес Крейсера</param>
/// <param name="bodyColor">Основной цвет</param>
/// <param name="secColor">Второстепенный цвет</param>
2023-09-25 14:09:42 +04:00
public EntityCruiser(int speed, double weight, Color bodyColor, Color secColor)
2023-09-25 11:15:05 +04:00
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
SecondColor = secColor;
}
}
}