Hey, how do I spawn 2 Objects in 2 different sizes?
I have one square which has to be 50x50 and the other one is random between 30 and 50, but I dont know how to give them different sizes.
1 2 3 4 | public Square(boolean randomSized){ if (randomSized) getMyImage1(); else getMyImage();} |
1 | int x = 30+Greenfoot.getRandomNumber(20+1); |