Program listing on 48K Spectrum.
1 DEF FN a(r,n)=r-INT (r/n)*n: READ c$,m,n,v,p: LET x=RND*36+10: LET x$=c$(x): POKE n*(x$>"O"),3: LET c=FN a(3+PEEK 23673,256): CLS : LET x=x+n*(c$(p)=x$): PRINT "Room:";FN a(CODE c$(p),40)^2: FOR g=1 TO 4: LET h$=c$(p+CODE "IQWO"(g)-80): PRINT INK x$=h$;"NESW"(g);":";STR$ (FN a(CODE h$,40)^2) AND h$<"z": NEXT g: LET k=CODE INKEY$-48: POKE n*(c<>PEEK 23673),14+11*(k>0): LET h=m*v+9: LET v=8-v: LET n$=c$: FOR g=0 TO 5: LET c$(h+g*v)=n$(h+(g*v+v)*(g<5)): LET p=p+(h+g*v-p)*(n$(p)=c$(h+g*v)): NEXT g: LET m=FN a(m+1,6): POKE n,6: LET d=(k=8)-(k=5)+7*((k=6)-(k=7)): LET p=p+d*(c$(p+d)<"z"): POKE n*(p>8*(x>n))*(c$(p)<"P"),7: DATA "zzzzzzz()RS,U.zW012[4z]678a:zc<=>g\@zABCDEFzoHIJKLzzzzzzz",0,23620,1,8 |
The Story
You awake inside a small cube shaped room, unsure as to how you arrived here. All you can see are strange numbered exits. After a while you sense that the room you are in is moving. Perhaps there is some logic behind all of this? Be careful which exits you choose, for making a mistake could prove to be fatal! Will you eventually be able to escape the Cube alive? |
Rooms numbered as square of prime numbers are "killer rooms" (and thus must be avoided). |