Sheepdog Trials

In-game screen (original version)

Program listing on 48K Spectrum

In-game screen (Improved version, with thanks to Einar Saukas for his many suggested improvements)

Program listing on 48K Spectrum

Text Listing (Improved version)

1 POKE 23693,33:
 CLS :
 DIM x(8):
 DIM y(8):
 LET o=0:
 FOR t=1 TO 8:
 LET x(t)=4:
 LET y(t)=9+t:
 PRINT INK 0;AT 6+t,11;"#";AT 6+t,19;"#";AT 7+7*(t>1),12;"#######":
 NEXT t:
 LET o=o+(1-2*o)*(k=0)*(ABS (32*y(1)+x(1)-239)>1):
 LET s=0:
 FOR a=1 TO 4:
 READ u,g,h,s,r,i,j,c,x(a),y(a):
 PRINT AT 0,0;509-t,AT 7,14; INK o;"===   "(3*o+1 TO 3+3*o*(k=0));AT h,g; INK 1;" ";AT y(a),x(a); INK 2+5*u;"m@"(1+u):
 NEXT a:
 POKE (s<3 OR o)*(t<509)*23620,10:
 DATA a>1,x(a),y(a),s+u*(g>11)*(g<19)*(h>7)*(h<14),RND*4,(a=1)*((k=7)-(k=6))+u*((r<2)*SGN (g-x(1))+(r>2)*SGN (r-3)),(a=1)*((k=8)-(k=9))+u*((r>2)*SGN (h-y(1))+(r<2)*SGN (r-1)),ATTR (h+j,g+i)=33,g+i*c*(g+i>0)*(g+i<31),h+j*c*(h+j>0)*(h+j<21)

Download the game (original version)
Download the game (Recommended Improved version)

About the game

Your job is to guide the black sheepdog (red in the improved version) around the field in order to herd the three white sheep into the pen, and close the gate. The sheep will avoid the sheepdog as much as possible, so tend to walk in the direction away from the sheepdog, although they also have some random element to their movements. In the improved version, you have a limit of 500 moves to win the game, making it a real challenge. Thanks again to Einar Saukas for suggesting numerous improvements and optimisations to this game.

Rules of the game:-

Back to Sinclair stuff index