O'Reilly logo

Android: Game Programming by Raul Portales, John Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enhancing our math game

We are going to add some features to our math game using what we have just learned about methods and loops.

As usual, the code is available for copying in the Chapter4 folder of the code download. The project is in the MathGameChapter4 subfolder and encompasses all the remaining phases of improvement covered in this chapter, including enhancing the UI, amending our game activity, setQuestion, updateScoreAndLevel, isCorrect, and calling our new methods.

We will make the game change the question after each time we attempt the answer.

We will also add difficulty levels to questions and random questions but within a range appropriate for that difficulty level.

We will show and update our score. The score goes up faster depending ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required