Book Image

Learning Java by Building Android Games

By : John Horton
Book Image

Learning Java by Building Android Games

By: John Horton

Overview of this book

Table of Contents (17 chapters)
Learning Java by Building Android Games
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The four implementation phases in detail


Let's take an even closer look at the implementation before we actually get to it. Here is how we will divide the implementation into the four phases, this time with a bit more detail as to what to expect in each:

  • Phase 1 – MainActivity and onCreate: In this phase, we will create the project itself as well as implement the following steps:

    • We will add our imports and create the body of our MainActivity class

    • Within this, we will declare the member variables that the game needs

    • We will implement our onCreate method, which does loads of setup work but nothing that is hard to understand

  • Phase 2 – SquashCourtView part 1: In this phase, we will start work on our key class, SquashCourtView. Specifically, we will:

    • Implement the declaration of the SquashCourtView class and its member variables.

    • Write a simple constructor.

    • Implement the run method to control the flow of the game.

    • Implement the lengthy but fairly easy-to-understand updateCourt method. This is the method...