16.1 Setup

Open the ‘Tetris_start’ project. In it, you will find the graphics, sounds and fonts that we will use. A blank app ‘Tetris’ is also provided, but we are not going to use it just yet.

  1. Create a library at the highest level of the explorer. You do this by right clicking and choosing ‘new library’. Name this library ‘Tetris parts’. A library is a green folder. The code in a library can be used from any application within your project, just like the library ‘Esenthel Engine’ which is always present.
  2. Create a new application (blue folder). Call it ‘square tester’.
  3. in the application ‘square tester’, create a code file ‘main’.
  4. In the library ‘Tetris parts’, create a new folder (yellow) called ‘definitions’.
  5. Mark ‘square tester’ as the active application.

Copy the code in ‘Tetris/initState’ to ‘square tester/main’. Remove this line:

 
D.full(true);  

This makes it easier to terminate your application when something goes wrong.