ARTILLERY.BAS - Program Flow Diagram
Complete flow diagram showing all GOTO/GOSUB jumps and program structure
Legend
Sequential Flow
GOTO Jump
GOSUB Call
RETURN
Initialize
Input
Loop
Decision
Subroutine
End/Win
Key GOTO/GOSUB Jumps
- Line 16→19: Skip instructions if "N"
- Line 17→20: Show instructions
- Line 19→150: Start game (skip instructions)
- Line 190→170: Retry gun positions if too close
- Line 220→240: Handle wind direction
- Line 445→430: Invalid input retry
- Line 590→750: Projectile hit ground
- Line 670→750, 690→750: Out of bounds
- Line 760→800: Mountain hit detected (P2=5)
- Line 840→930, 890→930: After hit, ask play again
- Line 950-951→150: Play again (restart game)
- Line 1090-1110→1280: Mountain collision checks
- Line 1170→1240: Skip explosion if out of bounds
- Line 1340→1420: Player indicator drawing
- Line 1410→1300: Player indicator loop
- Line 1470→1460: Mountain height validation
- Line 1500→1480: Mountain spacing validation
- Line 1600→1620: Wind direction print
- Line 1650→1670: Set player position