Create the levels
Before we make some levels let's create another new package to put them in. As a reminder from the previous chapter, when you create a new package, it is important to do so in the correct folder. The correct folder is the same one that we have been putting all the Java files in throughout this book. If you called this project Platformer
it will be the app/java/yourdomain.platformer
folder.
In the Android Studio project explorer, right-click the app/java/yourdomain.platformer (NOT yourdomain.platformer(androidTest) or yourdomain.platformer(test)), select New | Package and name it Levels.
Tip
The step of creating a package is essential before you can copy and paste the class files.
We will now add some classes that will define all the layout of the levels of the game starting with a generic Level
class which all the others can extend.
Don't add this code yet, just glance at the different letters and numbers in the layouts that will represent different game objects...