On Oct 31, 2009, at 6:23 PM, Daniel Moore wrote:

> Back in the microcomputer age, there was a fascinating little game
> called Hamurabi (no, that isn't a typo - there was an eight character
> limit). The game mechanics were pretty simple: you were the ruler of a
> kingdom, and every year you had to decide what proportion of your
> grain to allocate to planting, and what proportion to feeding the
> people. The game engine would then set up the formulae, toss in a few
> random numbers and simulate your crop and population growth. For all
> its simplicity, though, it was a lot of fun to play, and oddly
> compulsive.
>
> The Wikipedia page[2] links to a couple of implementations in BASIC;
> pick one and reimplement it in Ruby.

Thanks for a very enjoyable quiz!

I wrote a super minimal BASIC interpreter to avoid translating the  
code.  (Yes, I am aware that's insane.  I'll seek help.)

Ironically, I think supporting that victory FOR loop at the very end  
was the hardest part.  I still have bugs in that.  :(

James Edward Gray II