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 ...
Get Android Game Programming: A Developer’s Guide 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.