Skip to content

Instantly share code, notes, and snippets.

@tomaes
Last active May 21, 2019 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaes/a63e12111f496b0b73ba2633ac93ec1c to your computer and use it in GitHub Desktop.
Save tomaes/a63e12111f496b0b73ba2633ac93ec1c to your computer and use it in GitHub Desktop.
The Commodore Plus/4 supports 121 colors. Let's use 3 of them for a micro game. Quickly press the first letter of the color shown (not the color word displayed)
10 vol 5
12 s=999: r=0
20 a$(0)="black": a(0)=1
22 a$(1)="grey ": a(1)=2
24 a$(2)="red ": a(2)=3
30 r=r+1
32 c=int(rnd(1)*3)
33 d=int(rnd(1)*3)
35 color1,a(d),5: printa$(c);
38 n=0: e=0
40 do
42 : get b$: s=s-1
44 : if b$=left$(a$(d),1) then n=1
50 : if s=0 or b$<>"" then e=1
55 loop until (n+e)>0
56 if n then sound1,880,3: color 1,1: print" >t:"s: s=s+20: goto30
60 sound 1,400,12: color 1,1
70 print: print"game over. rounds:"r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment