Summary

We came a really long way in this chapter. You got a serious handle on Java loops and took your first, fairly deep look into Java methods and how to use them. You learned how to generate random numbers and significantly enhanced your math game using all of the knowledge you gained.

As the chapters proceed, the games will get more and more real-game-like. In the next chapter, we will make a game to test the player's memory. It will have sound, animation and will actually save the player's high scores too.

Congratulations on your progress so far but let's keep going.

Get Learning Java by Building Android Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.