Motivation program:
 

HTML

 

 Class

 1. motivation   In this program a green spot is motivated to move to the top of the red spot maze.  The green spot can only move in a vertical or horizontal direction.  It only knows it's immediate surrounding red spots, so it tries to find some way to get to the top of the screen.  When it's desire is accomplished, there it rests.  Sometimes it gets frustrated and does some stupid things, but ...  Of course to reach it's goal there must be a way to the top.  You can vary the size of the spots by changing the "Number of sides of Square", also the number of red spots.  motivation.class

 To run  programs offline you need to save 2 files: (1) the web page and (2) the class for that web page.  Download and save the class(es)  in the same directory as you saved the web page.

Enjoy, Orland Hooge,  Chilliwack, B.C.,  Canada

Back to the JavaScript categories