Skip to content

abrudz/KINGDOM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KINGDOM

****************************************************
*                                                  *
*              Ⓚ*Ⓘ*Ⓝ*Ⓖ*Ⓓ*Ⓞ*Ⓜ                       *
*                                                  *
*              AN INTERACTIVE SIMULATION           *
*              DEMONSTRATION GAME.                 *
*                                                  *
*              PROGRAMMED BY THE APPLICATIONS      *
*              GROUP                               *
*              COMPUTING SERVICES,                 *
*              THE UNIVERSITY OF ALBERTA,          *
*              EDMONTON, ALBERTA.                  *
*                                                  *
*              BROUGHT TO U OF M WITH THE AID OF - *
*              GAIL LIFT AND GEORGE HELFFRICH      *
****************************************************

KINGDOM was originally implemented by in 1974 by Lee Schneider and Todd Voros as an expansion of the earlier HAMURABI (a.k.a. THE SUMER) game. This is an APL port of the game, taken from the workspace 6 KINGDOM in MVT for APL Version 2.00, further ported to Dyalog APL Unicode with the following minimal changes to make the code run on a modern system:

  1. The NUMBER;'TEXT' syntax for printing multiple arrays on the same line has been replaced by (⍕NUMBER),'TEXT'

  2. FORGET←⌶20 has been replaced by FORGET←⎕AI[3]

  3. R←6⌶1,X has been replaced by R←⎕RL←X,1

How to start

Enter (0⎕FIX'file://path/KINGDOM.dyalog').START .

Further instructions will be given by the game. If you want to answer no to a text prompt, make sure to do so in UPPERCASE as the code assumes that lowercase letters don't exist.

How to stop

At one of the ⎕: prompts, enter .

Example run

Try it online! (This has pre-populated answers so it cannot take the random results into consideration.)

Running as a website

The game can also be used through a browser by way of MiServer:

  1. Load the miserver.dws workspace
  2. Run Start '/mypath/KINGDOM
  3. Miserver will print a link which you can use to run the game.
  4. The subpage compare shows a comparison of the original code, the updated code, and the website code.