In the body of the loop generate random x and y coordinates


Implement the body of the createStars method that you created earlier. This method should include the following:

¦ Retrieve the world's background image.

¦ Use a for loop similar to the one in addAsteroids. The limit for the loop is given in the method parameter.

¦ In the body of the loop, generate random x and y coordinates. Set the color to white and then paint a filled oval with a width and height of two pixels.

Test! Do you see stars in your world? If all went well, you should.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: In the body of the loop generate random x and y coordinates
Reference No:- TGS02191918

Expected delivery within 24 Hours