Program listing on 48K Spectrum.

1 BORDER 3: POKE 23693,7: CLS : DIM t(2): DIM d(2): DIM c(2): DIM x(2,704): DIM y(2,704): LET h=1: LET x(1,1)=3: LET x(2,1)=28: LET y(1,1)=11: LET y(2,1)=11: LET d(2)=4: LET v=0: LET z=1: LET w=RND: LET g=1+h*(h<704): FOR r=1 TO 2: RESTORE : READ d,d,x,y,u,f,t: POKE (x<0 OR x>31 OR y<0 OR y>21 OR u<3)*23620,28: PRINT AT y(r,t),x(r,t);" " AND f=0;AT .5+w*20,.5+v*30; INK 6;"O" AND z=6; INK r;AT y,x;"o": READ x(r,g),y(r,g),c(r),t(r),d(r),z: NEXT r: READ h,v: POKE 23620,17: BORDER 3-r: DATA d(r)+SGN (IN (67582-3072*r)-IN (69630-6144*r)),d+8*((d<0)-(d>7)),x(r,h)+(d>6 OR d<2)-(d>2)*(d<6),y(r,h)+(d>4)-(d<4)*(d>0),ATTR (y,x),c(r)>-2,t(r)+1,x,y,c(r)+(u=6)*(3*w+1)-f,(t-f)*(t<704+f),d,z*(z<61)+1,g,w |