Squash – Basic

Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10211 – 10251.

Gallery

Squash – Basic

Source Code

   2 LET C=0
   3 LET X=0
   4 LET Y=0
   5 LET M=1
   6 LET L=1
   7 LET H=10
   8 LET F=0
   9 GOSUB 1000
  10 REM %B%U%I%L%D% %C%O%U%R%T
  15 FOR A=6 TO 14
  20 PRINT AT A,8;"% "
  30 PRINT AT A,19;"% "
  35 NEXT A
  40 FOR B=8 TO 19
  50 PRINT AT 5,B;"\.."
  60 NEXT B
  65 REM %S%C%O%R%E% %A%N%D% %B%A%T% %C%O%N%T%R%O%L
  70 PRINT AT 3,0;"SINCLAIR SCORE..0"
  75 PRINT AT 1,0;"YOUR SCORE IS...0"
  80 PRINT AT 15,H;" \'' "
  90 LET H=H+(INKEY$="P" AND H<17)-(INKEY$="Q" AND H>8)
 120 PRINT AT 6+Y,9+X;" "
 130 IF L+X>9<=L+X<0 THEN LET L=-L
 140 IF M+Y>8 OR M+Y<0 THEN LET M=-M
 150 LET X=X+L
 160 LET Y=Y+M
 170 PRINT AT 6+Y,9+X;"O"
 180 REM %C%H%E%C%K%S% %B%A%L%L% %P%O%S%I%T%I%O%N
 190 IF Y=8 AND ABS (H-X)>=9 THEN GOSUB 2000
 200 IF Y=8 AND ABS (H-X)=8 THEN GOSUB 3050
 210 GOTO 80
1000 PRINT "*********** SQUASH ***********"
1060 PRINT "*** FIRST TO SCORE 10 WINS ***"
1100 PRINT 
1110 PRINT "*USE P AND Q KEYS TO MOVE BAT*"
1120 PRINT 
1130 PRINT "***PRESS  .P.  KEY TO PLAY.***"
1140 IF INKEY$<>"P" THEN GOTO 1140
1150 CLS 
1160 RETURN 
2000 LET C=C+1
2050 PRINT AT 3,16;C
2060 IF C<10 THEN RETURN 
2070 CLS 
2080 PRINT AT 10,1;"***** COME ON TRY AGAIN *****"
2090 STOP 
3050 LET F=F+1
3060 PRINT AT 1,16;F
3070 IF F<10 THEN RETURN 
3080 CLS 
3090 PRINT AT 10,1;"* I WILL BEAT YOU NEXT TIME *"
3100 STOP 
3110 CLEAR 
3120 SAVE "1024%7"
3130 RUN 

People

No people associated with this content.

Scroll to Top