- Jim Storer, fall 1969: PDP-8 FOCAL
- David H. Ahl, 1973: BASIC
This game is presented in:
- BASIC
lunar.basadapted from the 1969 source code, compatible with modern ANSI BASIC interpreters. - Fortran
lunar.f90by Michael Hirsch is also given.
Any Fortran 2008 compliant compiler should work.
cmake -B build
cmake --build buildThe program defaults to stdin from user.
./build/lunar-landerOptions:
-dallows file redirection for testing and optimization-fspecifies initial fuel weight
To mimic the 1969 results
lunar-lander -f 16000 -d < fail.asc
lunar-lander -f 16000 -d < ok.ascThe 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