Created base class EntityLocomotive""

This commit is contained in:
ekallin 2023-09-23 19:20:20 +04:00
parent 1c87d04014
commit 9965a02c98

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectElectricLocomotive
{
public class EntityLocomotive
{
public int Speed { get; private set;}
public double Weight { get; private set;}
public Color BodyColor { get; private set;}
public double Step => (double) Speed * 100 / Weight;
public EntityLocomotive(int speed, double weight, Color bodyColor)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
}
}
}