Step 1: Getting the starter code

Explore the provided code for the Tetrominos user interface, in preparation for writing the game.

To get you started, and let you focus on practicing Java skills rather than writing user interface code, I have written the complete Tetrominos class and a little bit of the Board class. To use them, create a class for each using Eclipse, and cut-and-paste the code for each class into Eclipse. The code is below in the two tabs of the code window. Don’t worry yet about how this code works; we’ll go over it soon.

Once you have added this code to your Eclipse project, use Eclipse to run You should see a window with a black background, containing a blue rectangle.

Get hands-on with 1200+ tech skills courses.