PIbd-22-Stroev-V.M.-Monorai.../Monorail/Monorail/Entities/EntityMonorail.cs

27 lines
691 B
C#
Raw Normal View History

2023-10-20 21:00:08 +04:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Monorail.Entities
{
public class EntityMonorail
{
public int Speed { get; private set; }
public double Weight { get; private set; }
public Color BodyColor { get; private set; }
public double Step => (double)Speed * 130 / Weight;
public EntityMonorail(int speed, double weight, Color bodyColor)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
}
2023-11-20 22:38:04 +04:00
public void setBodyColor(Color color)
{
BodyColor = color;
}
2023-10-20 21:00:08 +04:00
}
}