лаб - 4
This commit is contained in:
parent
75fa75b3eb
commit
1468070ed2
@ -22,7 +22,7 @@ dopColor, bool flightDeck, bool hangarDeck, bool route) :
|
||||
}
|
||||
Pen pen = new(Color.Black);
|
||||
Brush dopBrush = new SolidBrush(modernAircraftCarrier.DopColor);
|
||||
|
||||
|
||||
if (modernAircraftCarrier.FlightDeck)
|
||||
{
|
||||
g.DrawRectangle(pen, _startPosX + 10, _startPosY, 160, 10);
|
||||
|
@ -9,13 +9,9 @@ namespace AircraftCarrier
|
||||
public class EntityAircraftCarrier
|
||||
{
|
||||
public int Speed { get; private set; }
|
||||
|
||||
public float Weight { get; private set; }
|
||||
|
||||
public Color BodyColor { get; private set; }
|
||||
|
||||
public float Step => Speed * 100 / Weight;
|
||||
|
||||
public EntityAircraftCarrier(int speed, float weight, Color bodyColor)
|
||||
{
|
||||
Random rnd = new Random();
|
||||
@ -23,6 +19,5 @@ namespace AircraftCarrier
|
||||
Weight = weight <= 0 ? rnd.Next(40, 70) : weight;
|
||||
BodyColor = bodyColor;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -25,7 +25,6 @@ namespace AircraftCarrier
|
||||
_aircraftcarrier?.DrawTransport(gr);
|
||||
pictureBoxAircraftCarrier.Image = bmp;
|
||||
}
|
||||
|
||||
private void SetData()
|
||||
{
|
||||
Random rnd = new();
|
||||
|
Loading…
Reference in New Issue
Block a user