updated constructor
This commit is contained in:
parent
b9b074c809
commit
fbf7485bd1
@ -17,11 +17,12 @@ public class DrawingLiner {
|
||||
public void init(int speed, double weight, Color primaryColor,
|
||||
Color secondaryColor, LinerEntityType type,
|
||||
int capacity, int maxPassengers,
|
||||
boolean hasExtraDeck, boolean hasPool) {
|
||||
boolean hasExtraDeck, boolean hasPool, int deckNum) {
|
||||
linerEntity = new LinerEntity();
|
||||
deckDrawing = new DeckDrawing();
|
||||
linerEntity.init(speed, weight, primaryColor, secondaryColor,
|
||||
type, capacity, maxPassengers, hasExtraDeck, hasPool);
|
||||
deckDrawing.setDeckEnum(deckNum);
|
||||
pictureWidth = null;
|
||||
pictureHeight = null;
|
||||
startPosX = null;
|
||||
|
@ -140,14 +140,12 @@ public class FormLiner extends JFrame {
|
||||
new Color(random.nextInt(256), random.nextInt(256), random.nextInt(256)),
|
||||
new Color(random.nextInt(256), random.nextInt(256), random.nextInt(256)),
|
||||
LinerEntityType.CARGO, random.nextInt(9000) + 1000,
|
||||
random.nextInt(90) + 10, random.nextBoolean(), random.nextBoolean());
|
||||
random.nextInt(90) + 10, random.nextBoolean(), random.nextBoolean(), numberOfDecks);
|
||||
drawingLiner.setPictureSize(pictureBoxLiner.getWidth(),
|
||||
pictureBoxLiner.getHeight());
|
||||
drawingLiner.setPosition(random.nextInt(pictureBoxLiner.getWidth()),
|
||||
random.nextInt(pictureBoxLiner.getHeight()));
|
||||
|
||||
drawingLiner.setDeckNum(numberOfDecks);
|
||||
|
||||
drawTransport();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user