1.In each gameplay, 25 asteroids are generated at random X positions and begin falling towards the space rocket
-
Each asteroid is assigned a random color (red, green, or blue)
-
The user should be able to move the space rocket using the mouse without dragging
-
A colored laser beam (red, green, or blue) shoots out the rocket, and the user can change the color of the beam using the "Spacebar"
-
The user can destroy asteroids by: Aligning the laser beam with the asteroid and selecting the same color as asteroid
-
When an asteroid is successfully destroyed, the score increases by one point
-
There is a time limit of 20 seconds, after which the "Time's Up" screen is displayed with the user's final score
-
The user can press on F1 to restart the game
Note that when the user restarts the game, the asteroids' X values are randomly generated once again.