Last active
October 30, 2016 11:31
-
-
Save tomaes/461f4aa230e406bbf8e5c1b0d659fd30 to your computer and use it in GitHub Desktop.
Short (eh) memory card game for the standard VIC20 (should work on all the 8-bit Commodore machines, I think...)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 fori=.to7step2:m(i)=i+2:m(i+1)=i+2:next:r=1 | |
1 forj=.to9:fori=.to7:a=int(rnd(.)*8):h=m(i):m(i)=m(a):m(a)=h:nexti,j | |
2 print"#:"r:fori=.to7:printi;chr$(63+(m(i)<0)):next | |
3 r=r+1:input"cards";a,b:if(a=b)or((m(a)orm(b))<0)goto3 | |
5 printchr$(13)m(a)m(b)chr$(13):ifm(a)=m(b)thenm(a)=-m(a):m(b)=-m(b) | |
8 s=.:fori=.to7:s=s+m(i):next:if(s>-40)goto2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment