30 lines
605 B
C#
Raw Permalink Normal View History

2024-10-03 00:16:11 +03:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectGasolineTanker.Entities
{
2024-10-03 00:40:53 +03:00
2024-10-03 00:16:11 +03:00
public class EntityTruck
{
2024-10-03 00:40:53 +03:00
2024-10-03 00:16:11 +03:00
public int Speed { get; private set; }
2024-10-03 00:40:53 +03:00
2024-10-03 00:16:11 +03:00
public double Weight { get; private set; }
2024-10-03 00:40:53 +03:00
2024-10-03 00:16:11 +03:00
public Color BodyColor { get; private set; }
2024-10-03 00:40:53 +03:00
2024-10-03 00:16:11 +03:00
public double Step => (double)Speed * 100 / Weight;
2024-10-03 00:40:53 +03:00
2024-10-03 00:16:11 +03:00
public EntityTruck(int speed, double weight, Color bodyColor)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
}
2024-10-03 00:40:53 +03:00
2024-10-03 00:16:11 +03:00
}
2024-10-03 00:40:53 +03:00
}