Files
basic-computer-games/38_Fur_Trader/c/README.md
Chris Reuter d26dbf036a Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
2021-11-21 18:30:21 -05:00

24 lines
1.1 KiB
Markdown

Original source downloaded [from Vintage Basic](http://www.vintage-basic.net/games.html)
Conversion to [ANSI-C](https://en.wikipedia.org/wiki/ANSI_C)
##### Translator Notes:
I tried to preserve as much of the original layout and flow of the code
as possible. However I did use enumerated types for the Fort numbers
and Fur types. I think this was certainly a change for the better, and
makes the code much easier to read.
I also tried to minimise the use of pointers, and stuck with old-school
C formatting, because you never know how old the compiler is.
Interestingly the code seems to have a bug around the prices of Fox Furs.
The commodity-rate for these is stored in the variable `D1`, however some
paths through the code do not set this price. So there was a chance of
using this uninitialised, or whatever the previous loop set. I don't
think this was the original authors intent. So I preserved the original flow
of the code (using the previous `D1` value), but also catching the
uninitialised path, and assigning a "best guess" value.
krt@krt.com.au 2020-10-10