I made this for the unexpanded VIC-20:
0 def fn
l(i)=a%(y-i,x-i)+a%(y-i,x)+a%(y-i,x+i)+a%(y,x-i)+a%(y,x+i)+a%(y+i,x-i)+a%(y+i,x
)+a%(y+o,x+o):poke36879,8:tr%=20:tc%=21:dim
a%(tr%,tc%),b%(tr%,tc%):h=.22:o=1:sr%=3:er%=18:ec%=19:c=.:g%=.:c1=2:c2=3:gosub
1000
1 for y=.to tr%:for x=.to tc%:a%(y,x)=b%(y,x):if a%(y,x)=.then print" ";:goto 3
2 print"*";
3 next x,y:print "generation:";g%;"{home}";:g%=g%+o:for y=o to tr%-o:for x=o to
tc%-o:c=.:c=fn l(o):if a%(y,x)=o and cc1and cc2then b%(y,x)=.:goto 5
4 if a%(y,x)=.and c=c2then b%(y,x)=o
5 next x,y:if g%<32768 then goto 1
6 goto6:donkeysoft
1000 print"{clear}{green}pet colonies, based upon space colony by tim
hartnell circa 1983 in turn based upon conway's game of
life{home}";:for y=sr% to er%:for x=sr% to ec%:b%(y,x)=rnd(.)+h:next x,y:return
Programmed with CBM PRG Studio.
The Commodore C64/128 version is here ->
https://github.com/sbebbers/PET-Colonies#pet-colonies-64-for-the-commodore-6412
8-and-compatibles
Obviously, with it being BASIC, it's quite slow. Although with an accelerator
and BLITZ BASIC it's pretty quick.
Regards,
Shaun
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|