ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
1.4 KiB

  1. 2 PRINT TAB(30);"DEPTH CHARGE"
  2. 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
  3. 6 PRINT: PRINT: PRINT
  4. 20 INPUT "DIMENSION OF SEARCH AREA";G: PRINT
  5. 30 N=INT(LOG(G)/LOG(2))+1
  6. 40 PRINT "YOU ARE THE CAPTAIN OF THE DESTROYER USS COMPUTER"
  7. 50 PRINT "AN ENEMY SUB HAS BEEN CAUSING YOU TROUBLE. YOUR"
  8. 60 PRINT "MISSION IS TO DESTROY IT. YOU HAVE";N;"SHOTS."
  9. 70 PRINT "SPECIFY DEPTH CHARGE EXPLOSION POINT WITH A"
  10. 80 PRINT "TRIO OF NUMBERS -- THE FIRST TWO ARE THE"
  11. 90 PRINT "SURFACE COORDINATES; THE THIRD IS THE DEPTH."
  12. 100 PRINT : PRINT "GOOD LUCK !": PRINT
  13. 110 A=INT(G*RND(1)) : B=INT(G*RND(1)) : C=INT(G*RND(1))
  14. 120 FOR D=1 TO N : PRINT : PRINT "TRIAL #";D; : INPUT X,Y,Z
  15. 130 IF ABS(X-A)+ABS(Y-B)+ABS(Z-C)=0 THEN 300
  16. 140 GOSUB 500 : PRINT : NEXT D
  17. 200 PRINT : PRINT "YOU HAVE BEEN TORPEDOED! ABANDON SHIP!"
  18. 210 PRINT "THE SUBMARINE WAS AT";A;",";B;",";C : GOTO 400
  19. 300 PRINT : PRINT "B O O M ! ! YOU FOUND IT IN";D;"TRIES!"
  20. 400 PRINT : PRINT: INPUT "ANOTHER GAME (Y OR N)";A$
  21. 410 IF A$="Y" THEN 100
  22. 420 PRINT "OK. HOPE YOU ENJOYED YOURSELF." : GOTO 600
  23. 500 PRINT "SONAR REPORTS SHOT WAS ";
  24. 510 IF Y>B THEN PRINT "NORTH";
  25. 520 IF Y<B THEN PRINT "SOUTH";
  26. 530 IF X>A THEN PRINT "EAST";
  27. 540 IF X<A THEN PRINT "WEST";
  28. 550 IF Y<>B OR X<>A THEN PRINT " AND";
  29. 560 IF Z>C THEN PRINT " TOO LOW."
  30. 570 IF Z<C THEN PRINT " TOO HIGH."
  31. 580 IF Z=C THEN PRINT " DEPTH OK."
  32. 590 RETURN
  33. 600 END