файлы лабораторной

This commit is contained in:
Ivan_Starostin 2023-12-22 20:03:09 +04:00
parent 23de842f82
commit 6cb8323d1b

View File

@ -0,0 +1,41 @@
package entities;
import java.awt.*;
import java.util.function.Supplier;
public class EntityLainer {
private int speed;
public int getSpeed(){
return speed;
}
private double weight;
public double getWeight(){
return weight;
}
private Color bodyColor;
public Color getBodyColor(){
return bodyColor;
}
private Color additionalColor;
public Color getAdditionalColor(){
return additionalColor;
}
private boolean isPool;
public boolean getPool() {
return isPool;
}
private boolean isMultipleDecks;
public boolean getDeks(){return isMultipleDecks;}
public double step;
public double getStep() {return step;}
public void init(int speed, double weight, Color bodyColor, Color
additionalColor, boolean pool, boolean decks) {
this.speed = speed;
this.weight = weight;
this.bodyColor = bodyColor;
this.additionalColor = additionalColor;
this.isPool = pool;
this.isMultipleDecks = decks;
step = speed * 100 / weight;
}
}