24 lines
678 B
C#
24 lines
678 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HoistingCrane
|
|
{
|
|
public class EntityHoistingCrane
|
|
{
|
|
public int Speed { get; private set; }
|
|
public float Weight { get; private set; }
|
|
public Color BodyColor { get; set; }
|
|
public float Step => Speed * 100 / Weight;
|
|
public EntityHoistingCrane(int speed, float weight, Color bodyColor)
|
|
{
|
|
Random rnd = new();
|
|
Speed = speed <= 0 ? rnd.Next(30, 100) : speed;
|
|
Weight = weight <= 0 ? rnd.Next(300, 500) : weight;
|
|
BodyColor = bodyColor;
|
|
}
|
|
}
|
|
}
|