The first thing we need to do is make a small correction to the previous post on pseudo coding this project. I reversed the order of the land steps and they should be:
Handle land purchase, if any. Handle land sales, if any.
Now we start breaking down the steps. The first step is to display this years status.
Report year of term. Report starvations. Report arrivals. Report Plague, if any. Report current population. Report acreage. Report harvest. Report pest damages. (Rats) Report stored grain.
As you can see there is quite a bit going on just in this first step. By breaking the code up this way you make it more modular. Each step becomes a small section of code, that is more easily managed.
Now going back to our original, corrected, pseudo code, notice how compact it is. This little section of pseudo code is the main program and if you have a problem with the program it should be fairly easy to find.
With Hamurabi, you are playing for a ten year term so the main program is going to consist of ten turns. Each turn you are going to: Display this years status. Handle land purchase, if any. Handle land sales, if any. Handle feeding the people. Handle planting the fields This will continue for ten years or until you really mess up.Say the annual status doesn’t look right. You can go to the section of the pseudo code “Display this years status.” Maybe you tried to sell some land and the amount of land you have left or the amount of grain you have doesn’t match. Just go look at “Handle land sales, if any.”

Modular code is great for readability and maintainability, but when it comes down to pure speed, it’s hard to beat monolithic code.