VariableDeclarations: type tAlphaBomb sChar as string iY as integer iX as integer end type dim AlphaBomb(1) as tAlphaBomb DangerBomb% = 1 NewBomb% = 1 StopGame% = 0 ' MainProgram: gosub NewBomb do cls gosub DisplayBombs sound 55, 3 sleep 0.75 gosub PrepNextBombPositions gosub CheckKeyboard loop while NOT StopGame% end ' NewBomb: AlphaBomb(NewBomb%).sChar = chr$(int(rnd * (90 - 65 + 1) ) + 65) AlphaBomb(NewBomb%).iY = 1 AlphaBomb(NewBomb%).iX = int(rnd * (80) + 1) return ' DisplayBombs: for i = 1 to 24 locate AlphaBomb(i).iY, AlphaBomb(i).iX print AlphaBomb(i).sChar next i return ' PrepNextBombPositions: for i = 1 to 24 AlphaBomb(i).iY += 1 if AlphaBomb(i).sChar <> "" and AlphaBomb(i).iY = 25 then AlphaBomb(i).sChar = "" locate AlphaBomb(i).iY-1, AlphaBomb(i).iX print "*" sound 37,3 sleep 9/18 DangerBomb% = i mod 24 + 1 end if next i NewBomb% = NewBomb% mod 24 + 1 Gosub NewBomb return ' CheckKeyboard: NextKey$ = inkey$ while NextKey$ <> "" if NextKey$ = chr$(27) then StopGame% = -1 else if NextKey$ = AlphaBomb(DangerBomb%).sChar then locate AlphaBomb(DangerBomb%).iY-1, AlphaBomb(DangerBomb%).iX print "#" sound 290, 1 sleep 3/18 AlphaBomb(DangerBomb%).sChar = "" DangerBomb% = DangerBomb% mod 24 + 1 end if end if NextKey$ = inkey$ wend return