Created base class EntityLocomotive""
This commit is contained in:
parent
1c87d04014
commit
9965a02c98
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user