App Inventor Logo

Let's Build an APP

Hi-Lo A classic Number guessing Game

Programming - switch to BLOCKS:

Clicking on an object lets you access it's EVENT HANDLERS, PROPERTIES and METHODS

Add an "onclick" for your btnNew


The game is driven from the "btnGuessClick", add one (this will be our game wrapper):


This stuff just checks for game state, and provides the first "ENDGAME" exit (where we run out of guesses), the EMPTY "then" in the middle is where we place our "take a turn" code:


Plug this code chunk into the missing spot and you have a functioning HiLo game (you might like to HIDE the mystery number on the screen when you are convinced your programming is bug free)

Now let's add some MODULES