Lab1 Done+

This commit is contained in:
Артём Яшин 2023-10-25 21:05:26 +04:00
parent dd894ab3ef
commit f6f598adff

View File

@ -74,8 +74,11 @@ public class FrameAirBomber extends JFrame {
Random random = new Random();
drawingAirBomber = new DrawingAirBomber();
pictureBox.setBounds(0,0,getContentPane().getWidth(),getContentPane().getHeight());
drawingAirBomber.init(random.nextInt(200) + 100, random.nextInt(2000) + 1000, new Color(random.nextInt(256), random.nextInt(256), random.nextInt(256)),
new Color(random.nextInt(256), random.nextInt(256), random.nextInt(256)), random.nextBoolean(), random.nextBoolean(), pictureBox.getWidth(), pictureBox.getHeight(), (random.nextInt(3)+1)*2);
drawingAirBomber.init(random.nextInt(200) + 100, random.nextInt(2000) + 1000,
new Color(random.nextInt(256), random.nextInt(256), random.nextInt(256)),
new Color(random.nextInt(256), random.nextInt(256), random.nextInt(256)),
random.nextBoolean(), random.nextBoolean(), pictureBox.getWidth(), pictureBox.getHeight(),
(random.nextInt(3)+1)*2);
drawingAirBomber.setPosition(random.nextInt(90) + 10, random.nextInt(90) + 10);
draw();
}