Skip to content

asteroids

Parodper edited this page Mar 30, 2019 · 2 revisions

ASTEROIDS Program

Objetive: Don't get hit by the Obstacles by pressing [EXE] to move

Example game:

+----------------+
|xxxxxxxxxxxxxxxx|
| >     0   0    |
|     0    0     |
|xxxxxxxxxxxxxxxx|
+----------------+

Variables

  • A: Ship location
  • B: Key pressed
  • K: Asteroids dodged
  • D, E, G, I: Position on the horizontal axis
  • C, F, H, J: Position on the vertical axis

Gotos

  • 0: Main loop
  • 1: Key manager
  • 2: Waits for key to stop beign pressed
  • 3: End program
Clone this wiki locally