THIS PROGRAM for the unexpanded Jupiter Ace is the legendary Surround program translated into Forth with sound and high-resolution graphics. Your task is to control the man who runs around the screen trying to avoid the randomly-produced blocks which appear next to him. You must avoid having to run into a block for as long as possible and the computer keeps count of how many times you have moved. My best is 207.
A hint: try to stay in one area as long as it is safe in order to fill up as much of that part of the screen as possible.
There are three variables : a, which is your position on the screen; s, which is used to produce the random numbers; and sc which keeps count of your moves.
The words ss and rnd produce a random number. Set draws a boundary around the screen; fin is the end of the game.
Mv moves your man around the screen and check to see if you have hit a block, bk prints a block randomly next to you on the screen. Go sets up the variable and uses a Begin-Until loop to continuously keep the game going until it reaches fin. Man stores the data for the character; game starts the game.
|