Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Assignment: An Asteroids Screen This assignment is about using variables, data types, loops, if statements, and FX Graphics to draw a single screen from

image text in transcribed
The Assignment: An Asteroids Screen This assignment is about using variables, data types, loops, if statements, and FX Graphics to draw a single screen from the classic video game Asteroids, configured according to user input. Don't worry, it's just a still screen-nothing has to move in this assignment.) Setup Use the FXGraphics Template for this assignment Change the class name to something meaningful and change the window title, and size of the stage to whatever makes sense. Input When your program runs. It should have a dialog with the user don't show the lavaFX stage until after this dialog is over). Ask the user: 1) the x and y location of the center of each asteroid as well as its site (allow the user to decide how many asteroids), 2) the current score, 3) the number of lives remaining. 4) the x and y location of the player's spaceship, 5) the x and y location of at least 1 allen spaceship, and 6) the color of the player's spaceship and the alien spaceship (use integers, e-B. Ired, 2-blue, 3-green). Make sure the user enters values that will look good legeach asteroid should display fully on the screen). Give the user a range of acceptable values in each prompt and make them repeat each input until they get it right Important Tip: Instead of storing the asteroid locations and sizes, draw each asteroid as soon as the user has entered its x, y, and size values. Output When the stage appears, it should look a bit like a scene from an Asteroids game, as shown below. Score and lives 91310 Asteroids AAAAAA Alien Spaceship Player's Spaceship D Copyright [Your name, 2021)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are the six steps in applying for a patent?

Answered: 1 week ago