vak: (Default)
[personal profile] vak
Буду постепенно выкладывать примеры игр из упомянутой книжки.

Hammurabi это повторение на языке Питон исторически первой текстовой игры The Sumerian Game 1962 года. У древних игр обычно есть много реализаций, но я собираюсь искать и показывать опенсорсные версии.

Скачиваем, запускаем:
$ wget https://github.com/wzhishen/hammurabi/blob/master/hammurabi.py
$ python2 -i hammurabi.py
>>> hammurabi()
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 infestations and the plague! Grain is the general currency,
measured in bushels. The following will help you in your decisions:

* Each person needs at least 20 bushels of grain per year to survive.

* Each person can farm at most 10 acres of land.

* It takes 2 bushels of grain to farm an acre of land.

* The market price for land fluctuates yearly.

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!
O great Hammurabi!
You are in year 1 of your ten year rule.
In the previous year 0 people starved to death.
In the previous year 5 people entered the kingdom.
The population is now 100.
We harvested 3000 bushels at 3 bushels per acre.
Rats destroyed 200 bushels, leaving 2800 bushels in storage.
The city owns 1000 acres of land.
Land is currently worth 19 bushels per acre.
There were 0 deaths from the plague.

How many acres of land will you buy? (0 to DECLINE)
1
How many bushels of grain will you feed to the people?
2000
How many acres of land will you plant with seed?
1000
O great Hammurabi, we have but 781 bushels to spend farming the land!
1000 acres are too many for us! We lack enough bushels to start our farming!
Please factor our funds. Again, how much land will you plant with seed?
[HINT: The maximum possible acres of current total funds to spend farming is 390 acres.]
390
***Thank God! No plague this year***
***O brilliant Hammurabi! This year we have NO people starved***
***O great Hammurabi, this year 3 immigrants come to our kingdom***
***O great Hammurabi, this year we harvest 1950 bushels of grain***
***O great Hammurabi, unluckily a horrible RAT INFESTATION happened! 546 bushels of grain were destroyed***
***O great Hammurabi, the price of land will be 19 bushels per acre next year***

O great Hammurabi!
You are in year 2 of your ten year rule.
In the previous year 0 people starved to death.
In the previous year 3 people entered the kingdom.
The population is now 103.
We harvested 1950 bushels at 5 bushels per acre.
Rats destroyed 546 bushels, leaving 1405 bushels in storage.
The city owns 1001 acres of land.
Land is currently worth 19 bushels per acre.
There were 0 deaths from the plague.

How many acres of land will you buy? (0 to DECLINE)
_

Date: 2023-07-11 05:34 (UTC)
spamsink: (Default)
From: [personal profile] spamsink
Очевидно, ноги у королевства Эйфория растут из какого-то клона этой игры.

Date: 2023-07-11 06:40 (UTC)
spamsink: (Default)
From: [personal profile] spamsink

Эта, судя по фразам, чуть расширена по сравнению с тем, что у нас было.

Dukedom was written in PL/I D by Vince Talbot in 1976 as an expanded version of Kingdom

Видимо, надо искать Kingdom.

Также в Hamurabi пишут A conversion of this game was included on the BBC Micro's Welcome Tape and Welcome Disc as Yellow River Kingdom (1981). "Yellow River" (в received pronunciation) несколько созвучно с "Эйфория", что наводит на мысли.

Edited Date: 2023-07-11 06:47 (UTC)

Date: 2023-07-11 21:19 (UTC)
spamsink: (Default)
From: [personal profile] spamsink
Это что-то совсем простое. Возможно, "Эйфория" и была клоном Dukedom, просто я не помню некоторые сообщения. Кстати говоря, эта же игра была и на СМ-ках, потому что была DEC-овская версия на Бейсике. Может быть, оттуда её на БЭСМ и портировали.

Интересно, что "Euphoria Kingdom" - очень популярное название для игр и посейчас, так что поиск весь замусорен.

Date: 2023-07-11 21:26 (UTC)
spamsink: (Default)
From: [personal profile] spamsink
Спасибо. Оказывается, это совсем не в ту сторону. Торговли нет, золота нет, войн с соседями нет, населена роботами.

Значит, рабочая версия, что "Эйфория" - это перевод какой-то из версий Dukedom, плюс-минус мелочи перевода (напр., в русской версии "Мыши наводнили ваши амбары", а в английских везде rats) или мелкие сокращения (скажем, я не помню в русском варианте персонажа "High King").