Dolgov D.A. Hard Lab Work 1 #1

Closed
devil_1nc wants to merge 6 commits from LabWork01 into master
Showing only changes of commit 91db5cf763 - Show all commits

View File

@ -2,8 +2,8 @@ import java.awt.Color;
import java.util.Random;
public class EntityPlane {
private int Speed;
private float Weight;
private int Speed = 0;
private float Weight = 0;
private Color BodyColor;
public int getSpeed(){return Speed;}
@ -16,7 +16,13 @@ public class EntityPlane {
{
Random rand = new Random();
if (speed <= 0) speed = rand.nextInt(350, 550);
else {
Speed = speed;
};
if (weight <= 0) weight = rand.nextFloat(350, 550);
else {
Weight = weight;
}
BodyColor = bodyColor;
}
}