|
|
Tetris in BBC BASIC:
0d=d:IFdVDUd:a=POINT(32*POS,31-VPOS<<5):RETURNELSEMODE9:GCOL-9:CLG:O
FF:d=9:REPEATVDU30:REPEATGOSUBFALSE:IFPOS=28VDUPOS,15,VPOS,24;11,26:IF0E
LSEIFa=0PRINT:UNTIL0ELSEUNTILVPOS=25:v=ABSRNDMOD7:i=0:VDU4895;3:REPEATm=
9-INKEY6MOD3:FORr=TRUETO1:t=rANDSGNt:IFt=rCOLOURv-15:VDUrEORm:i+=m=7AND9
-6*r:IF0ELSEFORn=0TO11:d=n/3OR2EORd:GOSUBFALSE:IF1<<(n+i)MOD12AND975AND&
C2590EC/8^vVDU2080*ABSr;:t+=a:IF0ELSENEXT,:VDU20:UNTILt*LOGm:UNTILVPOS=3
http://survex.com/~olly/rheolism/dsm_rheolism/
As I read the "features" I thought it absolutely *must* be a joke, how
on earth could all that functionality be in the code above. But with a
huge number of clever tricks it works, I especially like the method of
encoding all the shapes into a single hex constant and the method for
rotating them.
(Long) explanation here:
http://survex.com/~olly/rheolism/dsm_rheolism/explanation.html
Post a reply to this message
|
|