diff --git a/src/DoubleDeckerBus/DrawningObjects/DrawningBus.java b/src/DoubleDeckerBus/DrawningObjects/DrawningBus.java index fdbfaf0..9da9393 100644 --- a/src/DoubleDeckerBus/DrawningObjects/DrawningBus.java +++ b/src/DoubleDeckerBus/DrawningObjects/DrawningBus.java @@ -36,12 +36,12 @@ public class DrawningBus { _pictureHeight = height; EntityBus = new EntityBus(speed, weight, bodyColor); Random random = new Random(); - int a = random.nextInt(1,4); - if (a == 1) { + int option = random.nextInt(1,4); + if (option == 1) { DrawningDoor = new DrawningDoor(_busWidth, _busHeight, _startPosX, _startPosY, busPanel); - } else if (a == 2) { + } else if (option == 2) { DrawningDoor = new DrawningDoorOval(_busWidth, _busHeight, _startPosX, _startPosY, busPanel); - } else { + } else if (option == 3) { DrawningDoor = new DrawningDoorTriangle(_busWidth, _busHeight, _startPosX, _startPosY, busPanel); } DrawningDoor.ChangeDoorsNumber(random.nextInt(2, 6)); @@ -64,12 +64,12 @@ public class DrawningBus { _busHeight = busHeight; EntityBus = new EntityBus(speed, weight, bodyColor); Random random = new Random(); - int a = random.nextInt(1,4); - if (a == 1) { + int option = random.nextInt(1,4); + if (option == 1) { DrawningDoor = new DrawningDoor(_busWidth, _busHeight, _startPosX, _startPosY, busPanel); - } else if (a == 2) { + } else if (option == 2) { DrawningDoor = new DrawningDoorOval(_busWidth, _busHeight, _startPosX, _startPosY, busPanel); - } else { + } else if (option == 3) { DrawningDoor = new DrawningDoorTriangle(_busWidth, _busHeight, _startPosX, _startPosY, busPanel); } DrawningDoor.ChangeDoorsNumber(random.nextInt(2, 6));