mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-05 20:40:25 -08:00
Original source downloaded from Vintage Basic
Conversion to Lua by Alex Conconi
Lua porting notes
-
I did not like the old Western movie language style in the game introduction and decided to tone it down, even if this deviates from the original BASIC version.
-
The
craps_gamefunction contains the main game logic: it- prints the game credits and presents the intro question;
- asks for the end result and computes the original numer;
- calls
explain_solutionto print the various steps of the computation; - presents the outro question and prints a
boltif necessary.
-
Added basic input validation to accept only valid integers for numeric input.
-
Minor formatting edits (lowercase, punctuation).
-
Any answer to a "yes or no" question is regarded as "yes" if the input line starts with 'y' or 'Y', else no.