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.

computer science

Description

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 FXGraphicsTemplate 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 JavaFX 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 size (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 alien spaceship, and 6) the color of the player’s spaceship and the alien spaceship (use integers, e.g. 1=red, 2=blue, 3=green).

Instruction Files

Related Questions in computer science category