Move harvest calculation outside rat condition.

This fixes an error where the harvest was only added
to the total bushels if rats ate some.

Note in the BASIC file, we check to see if rats eat
the grain in line 522 and if not, go to line 530,
which is where the `S=S-E+H` calculation is done.
This commit is contained in:
Stephen Childs
2022-01-13 10:56:50 -05:00
parent d2cc1389a0
commit 6c1adde205

View File

@@ -154,7 +154,8 @@ while Z < 11: # line 270. main loop. while the year is less than 11
if int(C / 2) == C / 2: # even number. 50/50 chance
# REM *** RATS ARE RUNNING WILD!!
E = int(S / C) # calc losses due to rats, based on previous random number
S = S - E + H # deduct losses from stores
S = S - E + H # deduct losses from stores
C = gen_random()
# REM *** LET'S HAVE SOME BABIES