home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / MSWBASE4.ZIP / IDEAS / GAME.SBP < prev    next >
Encoding:
Text File  |  1990-01-31  |  2.1 KB  |  134 lines

  1. SBP
  2.   Γ e
  3.   ¼ à
  4.   ╦ e
  5.   ┤ £"Game"
  6.   ╫but$(16)
  7.   ¢px% 1 q16
  8.  cb$ "b"  H( (px%,2,0)) "%"
  9.  ex$ "but$(px%) = cb$:" cb$ "=px%"
  10.   ûex$
  11.   ▒px%
  12.   òb16%
  13.  Cp% 16
  14.  win$ "If you can imagine it..."  (13)  (13) " Microsoft Database can do it..."
  15.   £
  16.   ╧ ¢2
  17.   £2
  18.  Start$ "NEW GAME":q$ "QUIT"
  19. StartGame: 
  20.  hit% 0
  21.   ╧ ▀ 
  22.  Ñ
  23.   íhit% 
  24. hit% 16 p
  25.  ¥a$:a$  >(a$)
  26.  ía$ "N" 
  27. hit%  1 p
  28. ct% 0:moves$ ""
  29.  wShuffle
  30.  wStartGame
  31.  Æ í
  32.  ía$ "Q" 
  33. hit%  2 p wEnditall  Æ í
  34.  wStartGame
  35.   Æ í
  36.  pos%  (Cp% hit%)
  37.   í((pos% 1) 
  38. (pos% 4)) p
  39.  í(pos% 1) p
  40.  í( ((Cp% 1) 4)  ((hit% 1) 4)) p
  41.  
  42.  wStartGame
  43.  Æ í
  44.  Æ í
  45. ex$ but$(Cp%) "=" but$(hit%)
  46.  ûex$
  47. ct% ct% 1
  48. moves$ "No. of Moves:"  (ct%,5,0)
  49. Cp% hit%
  50.  vEraseButton
  51.  £
  52.  íCp% 16 p vCheckWin  Æ í
  53.   ^
  54.  
  55.   Æ í
  56.   wStartGame
  57. Enditall: 
  58.  win$ "Thanks for 'playing'"  (13) "with"  (13) "Microsoft Database"
  59.   £1
  60.   Γ │: ╦ │
  61.   Æ
  62. EndGame: 
  63.  hit% 0
  64.   ╧ ▀ 
  65.  Ñ
  66.   ¥a$:a$  >(a$)
  67.   ía$ "Q" 
  68. a$  (27) 
  69. hit%  2 p wEnditall
  70.   ía$ "N" 
  71. hit%  1 pmoves$ "":ct% 0: wShuffle  Æ í
  72.   
  73.   wEndGame
  74. Shuffle: 
  75.   òa%
  76.   ╫a%(16)
  77.   ¢x% 1 q16
  78.  ex$ "a%(x%)=" but$(x%)
  79.   ûex$
  80.   ▒x%
  81.   ¢x% 1 q30
  82. S1: 
  83.  px%  (16  (1) 1)
  84.   ípx% Cp% p wS1
  85.  fr%  ((Cp% 1) 4)
  86.  g%  ((px% 1) 4)
  87.  pos%  (fr% g%)
  88.  disp% (Cp% px%) { 4:4
  89.   ╪pos% 0
  90.  a%(Cp%) a%(Cp% disp%)
  91.  Cp% Cp% disp%
  92.  pos% pos% 1
  93.   ┘
  94.  pos%  (Cp% px%)
  95.  disp% (Cp% px%) { 1:1
  96.   ╪pos% 0
  97.  a%(Cp%) a%(Cp% disp%)
  98.  Cp% Cp% disp%
  99.  pos% pos% 1
  100.   ┘
  101.   ▒x%
  102.   ¢x% 1 q16
  103.  ex$ but$(x%) " = a%(x%)"
  104.   ûex$
  105.   ▒x%
  106.   òa%
  107.   vEraseButton
  108.   £
  109.   wStartGame
  110. EraseButton: 
  111.  cb$ but$(Cp%)
  112.  ex$ cb$ "=0:erase " cb$
  113.   ûex$
  114.   ├
  115. QueryButton: 
  116.  ex$ "ret%=" but$(px%)
  117.   ûex$
  118.   ├
  119. CheckWin: 
  120.   ¢x% 15 q1 k 1
  121. ex$ "cb% =" but$(x%) "- x%"
  122.  ûex$
  123.  ícb% 0 px% 1
  124.   ▒x%
  125.   ícb% p ├
  126.  win$ "You Won!!"
  127.   £1
  128.   ¢x% 1 q4
  129.  win$ "You Won!!"
  130.   
  131.   £
  132.   ╧ ¢.7
  133.  win$ ""
  134.   £
  135.   ╧ ¢.3
  136.   ▒x%
  137.  moves$ "You Won in "  H( (ct%,5,0)) " moves!"
  138.   £2
  139.   wEndGame
  140.  
  141.  
  142.