This Simon-type program is an old favourite — with several original features. You can now win and choose Your level of difficulty in this game by Brian Lewis This Simon-type program is an old classic which has a number of innovative features. For example you can select your level of difficulty, and your choice spans from 1 to 99. This means that you can play as fast as you tike. Once the game starts, you are in command and the computer prompts you between operations. There is no time limit so you are in charge, not your micro. One original feature is the fact that you can win. Your goal is to get a sequence of 20 correct and as you come closer to your goal, so the rating at the end of the game increases. Your on-screen scoreboard shows you how many you have got right. When the game begins, you are asked to press the fire button on joystick-1 or the copy key. This decides your interface selection with Simon. Choose How it works - 100 GOSUB initialisation
- 110 GOSUB play sequence
- 200-330 input guesses, process them
- 210 GOSUB proceed and score routine, GOSUB title routine
- 220-320 FOR... NEXT loop to read each key, flash square and make associated sound. If sequence incorrect, jumps to 'wrong answer' routine 400 Note: in Amstrad BASIC, it's OK to jump out of FOR... NEXT loops: see F.3 of Amstrad's Concise BASIC Specification Manual for details
- 330 checks if game has been won
- 340-390 game won routine. Flashes all boxes and sounds in a kaleidoscope effect. Resets colours. GOSUB 1200 proceed routine, GOSUBs part of initialisation routine 890, then goes to 110
- 400-470 if answer wrong, plays correct sequence and gives rating
- 500-600 increases sequence length by one and then plays full sequence
- 530-600 play sequence
- 700-1010 initialisation 700 defines all variables used as integers, mainly to save computer memory
- 710-740 sets up arrays for colours and notes used in data statement at 1400
- 760-850 sets up all text windows, links them to associated papers and sets all colours used in the game
- 860 redirects all print statements to central window
- 870-880 draws screen
- 890-900 prints message for choosing input method, either fire button or copy key
- 910 seeds random number generator so each sequence will be different and initialises some of the variables used in the program
- 920-930 waits for fire button or copy key to be pressed and sets message printed by proceed routine (1200) and variables for up, down, left right etc accordingly
- 940-1000 allows user to set game level (1 to 99), 1 being the fastest
- 1100-1130 prints title in central window
- 1200-1240 prints score and waits for user to press fire button/ copy key as defined at 930
- 1300-1310 routine which waits until user takes finger off button before proceeding. In this way, slow operators do not skip program segments
- 1400 data for colours and sounds
- 1410 data for ratings
Home Computing Weekly #88 |