home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.sys.cbm      Discussion about Commodore micros      53,866 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 52,245 of 53,866   
   Shaun Bebbington to All   
   PET Colonies, based upon Conway's Game o   
   26 Apr 18 00:16:14   
   
   From: shaun@square-circle.co.uk   
      
   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 c<>c1and c<>c2then 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/sbeb   
   ers/PET-Colonies#pet-colonies-64-for-the-commodore-64128-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: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca