HP Forums
Hammurabi - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: Hammurabi (/thread-22418.html)



Hammurabi - CheshireChris - 09-28-2024 02:59 PM

This is a version of the classic resource management game "Hammurabi", in which the player must run ancient Sumeria for a ten-year term of office. Each year you must decide how much land to buy or sell, how much grain to feed your people, and how many acres of land to plant with seed. If you don't feed your people enough, some will starve and there is a risk of plague. If you starve too many people you will be impeached and thrown out of office before the end of the game! If you survive your ten-your term, you'll be presented with an assessment of your performance.

The program was converted from a BASIC listing in David Ahl's public domain book, "BASIC Computer Games, Microcomputer Edition", which can be downloaded from the Internet Archive. I've added a lot of comments to the source code so if you want to look at the source you should find it straightforward. I would encourage you NOT to look at the source code before playing, because it gives away the winning strategy. The program is 354 lines long and 21KB in size.

To install the program, simply copy the "Hammurabi.hpprgm" file to the "Programs" list on your Prime and run it either from the Program Catalog (Shift+1) or just by typing "Hammurabi" from the Home screen. All output is to the Prime's terminal. A line appears at the bottom of the terminal when input is required: enter a number and press the ENTER key. To exit at any time, press the ESC key.


RE: Hammurabi - Maximilian Hohmann - 10-04-2024 01:16 PM

Hello!

This brings back memories: The Sumerian Game was the third computer game I ever played (not counting some early video and arcade games) after "Moon Rocket Lander" on my father's HP-67 and "Hi-Lo Game" on my Ti59.

This was during an internship 1980 in a research facilty where we trainees were allowed access to a terminal of the mainframe computer (IBM or Amdahl, I don't know for sure) after normal working hours. The game was called "Kingdom" on this machine and since our user id had a very low priority compared to the large neutron-scattering computations that were running over night, between data entry and answer many seconds would pass. This gave us the impression that really complicated calculations were required for this simulation game :-)

Later I made a simple version for my Ti59 and my first "home computer", a Sinclair ZX-81. After that, I forgot about "Hammurabi" until now.

Regards
Max