Commit Graph

1455 Commits

Author SHA1 Message Date
Andrew Regan
c54f077e9b Improve battle number validation 2022-01-15 23:46:21 +00:00
Andrew Regan
e9823979e6 More robust validation 2022-01-15 23:34:11 +00:00
Andrew Regan
2e8050e7e6 Fix budget validation; restore "keep same allocations" 2022-01-15 22:54:13 +00:00
Andrew Regan
2bd4be3291 Make more readable 2022-01-15 22:43:28 +00:00
Andrew Regan
9301a30b13 Merge branch 'coding-horror:main' into main 2022-01-15 22:40:47 +00:00
Andrew Regan
fbbd9a7e81 Refactor 2022-01-15 22:40:17 +00:00
Andrew Regan
944a63215e Improve encapsulation 2022-01-15 22:11:45 +00:00
Andrew Regan
3dcb5f7ac0 Clean up YES/NO input and validation 2022-01-15 16:32:12 +00:00
Jeff Atwood
314dce5488 Merge pull request #508 from jnellis/main
Fix dice roll computation. Remove obscure input prompt for random num…
2022-01-14 15:36:54 -08:00
Joe Nellis
83de98b7f4 Fix dice roll computation. Remove obscure input prompt for random number generation scrambling. 2022-01-14 12:36:11 -08:00
Jeff Atwood
e906a49240 Merge pull request #507 from imiro/main
67-One Check on Python
2022-01-14 10:43:16 -08:00
imiro
84fda7f422 67-One Check on Python 2022-01-14 12:41:42 -06:00
Jeff Atwood
d246443aa3 Merge pull request #506 from NezumiRonin/patch-28
Create gomoko.pl
2022-01-14 09:38:57 -08:00
Nezumi Ronin
45626b24b8 Create gomoko.pl
Original "intelligent move" it's awful. Seems it only move below user.
2022-01-14 11:31:02 -06:00
Jeff Atwood
1ac638c343 Merge pull request #504 from hashtegner/main
Chief in Ruby
2022-01-14 09:26:38 -08:00
Jeff Atwood
22cbeeb187 Merge pull request #503 from jnellis/main
Java port of Craps. Updated Readme with detailed breakdown of the original BASIC code.
2022-01-14 09:20:54 -08:00
Jeff Atwood
7dd8f75bca Merge pull request #502 from bernardcooke53/12-bombs-away-python
12. Bombs Away in Python
2022-01-14 09:18:58 -08:00
Jeff Atwood
211c4d137d Merge pull request #505 from markbernard/main
Add Notepad++ syntax colouring for Vintage BASIC.
2022-01-14 09:18:30 -08:00
markbernard
a6881dcc31 Add Notepad++ syntax colouring for Vintage BASIC. 2022-01-14 09:54:49 -05:00
Alessandro Tegner
77e09cc163 Chief in Ruby 2022-01-14 09:32:16 -03:00
Joe Nellis
ada7fe6c74 Java port of BASIC Craps 2022-01-14 01:43:24 -08:00
Joe Nellis
7351bd0272 Breakdown of the original BASIC code for re-implementers of this game. Sample code in BASIC showing distribution of right and wrong dice rolls. 2022-01-14 01:42:44 -08:00
Bernard Cooke
9acef23180 Correct looping/breaking in number of missions dialogue 2022-01-14 08:47:21 +00:00
Bernard Cooke
ef3d4bf759 Tidy logic with inline conditionals for clarity 2022-01-14 01:53:41 +00:00
Bernard Cooke
e1fee6f3bd Tidy up 'Another mission?' message 2022-01-14 01:31:27 +00:00
Bernard Cooke
ff8217664b 12. Port Bombs Away to Python 2022-01-14 01:28:30 +00:00
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