файлы лабораторной
This commit is contained in:
parent
23de842f82
commit
6cb8323d1b
41
src/entities/EntityLainer.java
Normal file
41
src/entities/EntityLainer.java
Normal 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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user