mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-26 12:51:29 -08:00
MAINT: Apply pre-commit
Remove byte-order-marker pre-commit check as there would be many adjustments necessary
This commit is contained in:
@@ -5,21 +5,20 @@ Conversion to [Python](https://www.python.org/about/)
|
||||
##### Translator Notes:
|
||||
I tried to preserve as much of the original layout and flow of the code
|
||||
as possible. However I did use quasi enumerated types for the Fort numbers
|
||||
and Fur types. I think this was certainly a change for the better, and
|
||||
and Fur types. I think this was certainly a change for the better, and
|
||||
makes the code much easier to read.
|
||||
|
||||
I program in many different languages on a daily basis. Most languages
|
||||
require brackets around expressions, so I just cannot bring myself to
|
||||
write an expression without brackets. IMHO it makes the code easier to study,
|
||||
require brackets around expressions, so I just cannot bring myself to
|
||||
write an expression without brackets. IMHO it makes the code easier to study,
|
||||
but it does contravene the Python PEP-8 Style guide.
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user