| This game test how well you can estimate time.
First click one of the number-buttons 3,6,9,12,15,18 or 21
to select a time interval (measured in seconds).
Then click the Start button.
After a while click the Stop button.
The system will tell you whether you can won or lost.
You win if the time between start and stop is the one you selected;
you can be up to half a second out each way.
Variant 2: With display of actual duration.
Variant 3: Like variant 2, but: As long as no duration is selected, the START/STOP
buttons can be played repeatedly, working as a stopwatch.
In this case there is no win message.
Once you select a duration, a win/lose message will be produced after you hit
the stop button and the game will stop.
Technical information:
Variant 3 stores 'flags' as pieces on dummy positions.
Variant 2 uses the COMPILE command to set and save a variable which serves as a flag.
Also, in all variants the COMPILE command is used to store the selected Duration.
Again, we could instead define seven pieces for these durations and store the
appropriate piece on a dummy board position.
Therefore, the default variant could be written totally without the (somewhat technical)
COMPILE command, since the time measurements are hidden in the 'event'-coding.
I recommend for beginners to actually do this re-write as an exercise!
However, it is hardly possible to avoid the COMPILE command when it comes to the
measuring of time in variants 2 and 3, because stuffing too much of the logic into the
events would become too cumbersome. (Also, the timing would be out a little since
we really would like to capture the point of time when the button is clicked.)
See also my game Axiom_Made_Easy for an introduction to Axiom. |