Hammurabi

Hammurabi is an old game, dating back to the time when computers were text-only. Nevertheless, it's reasonably fun and certainly challenging.

An old saw has it that "You can write a C program in any language." This version is translated fairly directly from a JavaScript program, so it's not coded in a very Ruby-like fashion; but it does work.

Here are the standard instructions for the game:

Congratulations, you are the newest ruler of ancient Samaria, elected
for a ten year term of office. Your duties are to dispense food, direct
farming, and buy and sell land as needed to support your people. Watch
out for rat infestiations and the plague! Grain is the general currency,
measured in bushels. The following will help you in your decisions:
Rule wisely and you will be showered with appreciation at the end
of your term. Rule poorly and you will be kicked out of office!

Due to some problems with pmWiki formatting, I can't list the program here; it's in a separate file, Hammurabi.rb.