Putting everything together
Let's pick up our stub project, add all the classes we need to have a working game engine, and then modify the code so it allows us to start, stop, pause, and resume the game engine and display the number of milliseconds since the game was started.
We will put our current implementation of
GameObject inside the
Next, we will create another package named
com.example.yass.counter, which we will use for the code of this example.
YassActivity, we have an inner class named
PlaceholderFragment. We are going to rename it to
GameFragment, refactor it to a separate file, and put it under the
We are going to add a ...