...

/

Step 2: The Board class

Step 2: The Board class

The interesting modeling of the game will be in `Board.java` and other class files. So start reading code at `Board.java`.

We'll cover the following...

To focus on learning Java, you may reasonably ignore the Tetrominos class. It will be the file that you run to start the program, but the Board class can be thought of as the core of your Tetrominos program, and it’s where you’ll write the most code. Go to Eclipse and start reading the code now.

The keyword extends and some provided code in the constructor set the Board up as a user interface component that can be added to a window, and you may safely ignore this code.

Each of the other existing methods in the Board class will be called in response to certain actions, either by the user, or due to time passing. Specifically:

  • paintComponent ...