- Jim Storer, fall 1969: PDP-8 FOCAL
- David H. Ahl, 1973: BASIC
This game is presented in:
- BASIC
lunar.bas
adapted from the 1969 source code, compatible with modern ANSI BASIC interpreters. - Fortran
lunar.f90
by Michael Hirsch is also given.
Any Fortran 2008 compliant compiler should work.
cmake -B build
cmake --build build
The program defaults to stdin from user.
./build/lunar-lander
Options:
-d
allows file redirection for testing and optimization-f
specifies initial fuel weight
To mimic the 1969 results
lunar-lander -f 16000 -d < fail.asc
lunar-lander -f 16000 -d < ok.asc
The final output line is formatted for automatic parsing.
For reference the 1973 BASIC program from David Ahl may be run with many ANSI BASIC interpreters like:
bwbasic lunar.bas