# MODULE

A classic game, your task is to land on the moon with a spaceship. You are given with a starting height `V` and speed `R`, fuel `P`, engine load `V` and spaceship weight`H`. To achieve a safe speed for lending you have to do efficiently with the fuel. You can adjust the engine brake effect in the range 0%-100%. By entering a negative number the engine will be turned off for the corresponding number of cycles.
There are 5 predefined levels (numbered 0-4), the game lets you choose one of the at the start.

## Source code (595 B)

``` INPUT θ STATx H=RANDOM10^4 W=50+50RANDOM V=RANDOM10^3 R=RANDOM10^2 P=RANDOM10^2.6 IF θ=0 GOTO 1 H=10^4 W=75 V=250 R=50 P=V IF θ=1 GOTO 1 H=610^3 W=80 V=150 R=15 P=35 IF θ=2 GOTO 1 H=510^3 W=50 V=10^3 R=10^2 P=230 IF θ=3 GOTO 1 H=310^3 W=10^2 V=5 R=15 IF θ=4 GOTO 1 INPUT V INPUT R INPUT P INPUT W INPUT H LABEL 1 CLRT PRINT"HEIGHT PRINT V DATA 1 IF Σx<0 GOTO 3 IF P<=0 GOTO 3 WAIT CLRT PRINT"SPEED PRINT R WAIT CLRT PRINT"FUEL PRINT P WAIT LABEL 2 CLRT PRINT"BRAKES .. INPUT B IF 60<ABS (B-40 GOTO 2 STATx DATA B B=.5(ABS B+B LABEL 3 W=W(10^99)x√(ABS P+P G=1.62-10(WB/(H+P P=P-WB/240 V=V-R-G/2 R=R+G IF V>0 GOTO 1 CLRT IF R>10 GOTO 4 PRINT"YOU ARE OK! PRINT R END LABEL 4 PRINT"YOU DIED! PRINT R ```