SIMON SEZ Written by Joseph Zbiciak (im14u2c@primenet.com) Second place, Winter 1999 ECS BASIC Programming Competition March 20, 1999 ___________________________________________________________ When you run the game, the screen clears and SIMON builds up his pattern table, while he politely asks for "One moment." Once he's ready, he opens with a four-tone welcome and announces "SIMON SEZ." From that point forward, SIMON presents you with a pattern of lights/tones which starts simple and gets ever more complex. SIMON has four lights, and each light has a unique tone associated with it. The numbers "1", "3", "7", and "9" on the game-pad correspond to these four lights. SIMON will start out playing a sequence consisting of a single light/tone, and will expect you to respond by pressing the corresponding key. If you press an incorrect key, SIMON reminds you what the correct key was and the game is over. If you press the correct key, SIMON presents the pattern again, adding a new light/tone, and again, you are expected to respond, this time providing the new, longer pattern. The game continues with the pattern getting longer and more complex. The game continues until either you incorrectly replay the pattern, or until you get up to a pattern of 16 lights/tones long, at which point SIMON concedes that you've won. If you win, SIMON congratulates you, and replays the entire sequence again as sort of a "victory salute" to you. Whether you win or lose, you're presented with your score (10 pts times the number of tones you'd mastered), and bid farewell. If you want slower play, press "1", "2", or "3" on a hand-controller at the ECS title screen instead of the DISC. If you want shorter or longer play (in terms of pattern length), adjust lines 11 and 15 to whatever you like. Just make sure 'AA()' is big enough to hold the whole pattern specified by 'Z'. 10 CLR 11 Z=16 15 DIM AA(17) 20 PRIN "ONE MOMENT." 30 FOR I=1 TO Z 32 J=RN(0)/4 34 K=IT(J) 36 J=(J-K)*4 38 AA(I)=J 40 NEXT I 42 CLR 44 GSUB 400 45 FM(4)=6 46 PRIN " SIMON SEZ" 55 FOR K=1 TO Z 56 FOR M=1 TO K 57 I=AA(M) 58 GSUB 100 59 NEXT M 60 FOR M=1 TO K 61 G=AA(M) 62 GSUB 200 63 IF(G=I)GOTO 65 64 GOTO 300 65 NEXT M 66 NEXT K 75 FM(4)=6 80 PRIN " SIMON SEZ YOU WIN! " 90 GOTO 450 97 I=I+1 98 I=I+1 99 I=I+1 100 J=I*6+66 110 IF(I<2)GOTO 130 120 J=J+68 130 BK(J)=I+1 140 C=0 150 V=15 160 P=100*I+100 170 L=1200 175 E=0 176 REM DELAY 177 CALL HUSH 180 CALL ENVT 190 BK(J)=8 199 RET 200 I=0 210 CALL HAND 220 IF(H=9)GOTO 97 230 IF(H=7)GOTO 98 240 IF(H=3)GOTO 99 250 IF(H=1)GOTO 100 255 GOTO 210 300 I=G 301 P=1000 302 L=4000 303 CALL ENVT 305 FM(4)=2 306 PRIN " OOPS! SIMON SAID" 307 FOR G=0 TO 30 308 NEXT G 309 FOR G=0 TO 5 310 GSUB 100 311 NEXT G 320 K=K-1 330 GOTO 500 400 FOR I=0 TO 3 410 GSUB 100 420 NEXT I 430 RET 450 FOR M=1 TO Z 460 I=AA(M) 470 GSUB 100 480 NEXT M 500 FM(1)=0 501 FM(4)=7 502 K=K*10 510 PRIN "YOUR SCORE: ",K 513 FM(4)=0 515 PRIN "BE SEEING YOU. :-)" 520 BK(66)=5 525 BK(72)=5 530 BK(146)=5 535 BK(152)=5 550 END