App Inventor Logo
http://ai2.appinventor.mit.edu/

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

btnNewClick

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

gamewrapper

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:

gameGuts

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