Lets play some games shall we! .. for many of the next challenges i will be giving old classic games to be programmed.
Today your task is to implement Hamurabi. the link gives data required in implementing. Enjoy! :)
Edit: Here is the basic code for making things easier.
6
u/skeeto -9 8 May 26 '12 edited May 27 '12
I sorted through the shitty Basic code and this seems to be the important stuff:
Hammurabi
<instead of<=Constants
Country State Initialization
Each turn
Get user inputs
Year simulaton
40% chance of rats (25% or 50% food loss)
Bugs?
2
u/xjtian May 27 '12 edited May 27 '12
I'm pretty confident this is impossible to win. I've played through 10 years a few times, but I can't absolutely guarantee there are no bugs. Have fun with it!
Python:
EDIT: fixed possible divide by zero error. The more I play this, the more I'm convinced it's impossible to win. I've tried all kinds of strategies to no avail
1
u/robotfarts May 28 '12
This could have problems, since the game appears impossible when I play it. My code interprets the original BASIC:
0
u/Cosmologicon 2 3 May 25 '12
Where's the data? Like, where's the formula for how many bushels the rats ate? Are we meant to read the BASIC source code?
Anyway, I don't think I'm going to do this one. It doesn't look very challenging other than being a lot of work. I feel like only certain games really work for this format.