done
This commit is contained in:
parent
9bed7a6ad8
commit
09cac4779e
@ -101,14 +101,14 @@ public class ControllerMap {
|
||||
}
|
||||
private void ChangeDrawningOars(DrawningBoat boat) {
|
||||
IDrawningAdditionalElement newDrawningOars = switch (comboBoxOarsType.getValue()) {
|
||||
case "None" -> new DrawningOars(boat.GetBoat().GetBodyColor());
|
||||
case "Slim" -> new DrawningSlimOars(boat.GetBoat().GetBodyColor());
|
||||
case "Large" -> new DrawningLargeOars(boat.GetBoat().GetBodyColor());
|
||||
default -> null;
|
||||
};
|
||||
case "None" -> new DrawningOars(boat.GetBoat().GetBodyColor());
|
||||
case "Slim" -> new DrawningSlimOars(boat.GetBoat().GetBodyColor());
|
||||
case "Large" -> new DrawningLargeOars(boat.GetBoat().GetBodyColor());
|
||||
default -> null;
|
||||
};
|
||||
if (newDrawningOars != null) {
|
||||
newDrawningOars.SetNumberOars(Integer.parseInt(comboBoxNumOars.getValue()));
|
||||
boat.SetDrawningOars(newDrawningOars);
|
||||
boat.GetDrawningOars().SetNumberOars(Integer.parseInt(comboBoxNumOars.getValue()));
|
||||
}
|
||||
}
|
||||
private void UpdateGUI() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user