Commit Graph

1426 Commits

Author SHA1 Message Date
Jeff Atwood
f6164cb4eb Merge pull request #499 from LittleTealeaf/48_High_IQ_Python
48 High IQ in Python
2022-01-13 14:23:33 -08:00
Thomas Kwashnak
51ea729612 Misc final steps
Removed commented code
Added to README.md
2022-01-13 17:16:45 -05:00
=
f89180b83a Move code now properly works 2022-01-13 17:01:43 -05:00
=
6b612edfaf Fixed Bug 2022-01-13 16:59:25 -05:00
Jeff Atwood
db1b34b05d Merge pull request #494 from NezumiRonin/main
Perl changes.
2022-01-13 09:45:26 -08:00
Thomas Kwashnak
489995ac17 Using tests instead of try catches 2022-01-13 12:27:53 -05:00
Jeff Atwood
ebc68ccd8e Merge pull request #497 from kstolen0/main
Reverse in CSharp
2022-01-13 08:55:12 -08:00
Jeff Atwood
171fc106e3 Merge pull request #498 from zspitz/main
Some utility scripts for C# and VB.NET ports
2022-01-13 08:48:38 -08:00
Jeff Atwood
36f8cfa4c4 Merge pull request #500 from sechilds/fix_hamurabi_python
Fixes to the Python version of Hamurabi
2022-01-13 08:44:22 -08:00
Thomas Kwashnak
452d8b5da9 Commented and fixed error 2022-01-13 11:29:05 -05:00
Stephen Childs
06df6e10a1 Allow max fields to be worked in python Hamurabi.
In the BASIC version the calculation is on line 455:

`455 IF D<10*P THEN 510`

Which skips over the not enough people message.

In the Python version the logic is reversed, and we check
to see if there is too few people and then run the message:

`elif D >= 10 * P` (in the current code).

However, this means that the case where you want to plant the
maximum number of acres won't work.

e.g. You have 100 people (P) and want to plant 1000 acres (D).

`1000 >= 10 * 100`
`1000 >= 1000`

Which triggers the "not enough people code".

Maybe this is a bug in the original program.
2022-01-13 11:04:43 -05:00
Stephen Childs
3ca1aa1c62 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.
2022-01-13 10:56:50 -05:00
Zev Spitz
7f1c994f3d Fix: print projects for multiproject script 2022-01-13 16:32:13 +02:00
Zev Spitz
0a161c717b Some utility scripts for C# and VB.NET ports 2022-01-13 16:24:46 +02:00
Thomas Kwashnak
3e9a67a576 Replaced double quotes with single quotes 2022-01-13 09:14:39 -05:00
Thomas Kwashnak
e5da159007 Removed extra quotation mark 2022-01-13 09:07:33 -05:00
Thomas Kwashnak
3ec94a2888 Removed Commented Line 2022-01-13 08:47:41 -05:00
Thomas Kwashnak
b7d9d0d88d Added Post-Game prints 2022-01-13 08:45:48 -05:00
Thomas Kwashnak
daec93c14d Simplified / Shortened move script 2022-01-13 08:41:13 -05:00
Thomas Kwashnak
6d2855680b Finished Move script (if it is correct) 2022-01-13 08:36:27 -05:00
Kristian Stolen
a7d6a31c2c refactor and reformat output. 2022-01-13 16:53:09 +08:00
Kristian Stolen
4072cdc183 Handle array size inputs less than 1. 2022-01-13 16:41:24 +08:00
Kristian Stolen
4b0373110a Add test showing that reverse handles numbers less than zero. 2022-01-13 16:32:55 +08:00
Kristian Stolen
75ce861498 fix typo. 2022-01-13 16:28:54 +08:00
Kristian Stolen
d3335d2f7f Update display 2022-01-13 16:28:08 +08:00
Jeff Atwood
43d7a0ccf8 Merge pull request #496 from jbrouwer5/basketball_branch
Basketball in Java + Python bug fix
2022-01-12 21:54:17 -08:00
Jackson Brouwer
99dee87db0 Bug fix on defense change 2022-01-12 22:50:00 -06:00
Jackson Brouwer
4ac85902a2 Added Basketball Java Version 2022-01-12 22:47:27 -06:00
Jeff Atwood
717ee0c14f Merge pull request #495 from DyegoMaas/55_Life_csharp_refactor
Life in C# - fixes and better documentation
2022-01-12 16:07:34 -08:00
Dyego Maas
ee2d063b21 Removed extra line printed after each generation, to better match the original's visuals. 2022-01-12 20:23:17 -03:00
Dyego Maas
e43c43f0ca Adjusted message of "invalid" generations, matching the original. 2022-01-12 20:22:26 -03:00
Dyego Maas
254216d498 Refactoring. 2022-01-12 20:21:30 -03:00
Dyego Maas
c5db8cd501 Refactoring. 2022-01-12 20:08:53 -03:00
Dyego Maas
45fa39c02e Compensated for the displacement that was occurring in the y axis by adjusting the "middle" to a valid value when working with zero based indexes. 2022-01-12 20:07:52 -03:00
Dyego Maas
649eab2859 Temporary compensation for error calculating (possibly related to rounding) that caused misplacement of the initial pattern by 2 in the y axis. 2022-01-12 19:50:32 -03:00
Dyego Maas
51783355fb Adjusting indexes. 2022-01-12 19:49:30 -03:00
Alex Gomez
8f9f8eefbf Carriage return removed 2022-01-12 16:47:45 -06:00
Nezumi Ronin
c89ddbeac0 Merge branch 'coding-horror:main' into main 2022-01-12 16:43:14 -06:00
Dyego Maas
f36e0d23ca Fix various indexing problems that caused drifting. Now, the application behaves exactly like the original, even in "invalid" generations. 2022-01-12 16:09:10 -03:00
Dyego Maas
150b03a959 Fix the initialization of the matrix, which was displacing the pattern in the initial position onto the matrix, which caused the evolution of the simulation to variate in relation with the original game in Basic when once the cells reached the boarder (invalid cases). 2022-01-12 16:07:35 -03:00
Dyego Maas
ee22da5615 Fixes cropping that would happen when using an dot (.) in the beggining of the text. 2022-01-12 16:04:57 -03:00
Dyego Maas
23558cf68f Fixed pattern reading when inputing DONE, which would lead to incorrect sizing of the pattern transcribed to the matrix and caused drifting in relation to the original. 2022-01-12 16:04:14 -03:00
Jeff Atwood
7e947212d4 Update README.md
add Emulation and Bugfixes section
2022-01-12 10:27:50 -08:00
Jeff Atwood
95ebc6df6c Merge pull request #493 from authenticanttibrax/main
Add Java coding conventions to 20_Buzzword
2022-01-12 10:23:42 -08:00
Thomas Kwashnak
712edfa232 Update High_IQ.py 2022-01-12 13:22:32 -05:00
Thomas Kwashnak
daf35273f0 Fixed formatting of tabs into spaces 2022-01-12 13:07:07 -05:00
Thomas Kwashnak
3c9ac2f292 Merge branch 'coding-horror:main' into 48_High_IQ_Python 2022-01-12 13:05:44 -05:00
Dyego Maas
1123d12e07 Adding instructions on how to enter patterns, and also some examples. 2022-01-12 10:50:36 -03:00
Dyego Maas
52e2eccbf0 Adding instructions on how to run the example. 2022-01-12 10:09:31 -03:00
Dyego Maas
b59d4fd814 Performance optimization, reducing the amount of writes to the console necessary to output each iteration's matrix. 2022-01-12 09:50:35 -03:00