Asdcarl.287 net.games.emp utzoo!decvax!ucbvax!ucsfcgl!sdcarl!rusty Fri Apr 30 18:21:51 1982 mkemp.c Here is a simple little program I wrote for creating an empire world. The purpose of it is so that if the person that sets up the game is also playing the game they won't know who represents which country. It reads a list of user names on stdin, one per line, and writes the necessary "add country" commands on stdout. Sample usage might be % mkemp cmds % empire POGO peter [##:##] Command : execute cmds [##:##] Command : ^D % rm cmds It sets up each user with a country named "countryN" where "N" is some number and sends them a message telling them which country they represent. ===========> mkemp.c <============ # # define rani(min, max) (rand() % ((max) - (min)) + (min)) char **nams; int nnams; main() { getnams(); mixnams(); # ifdef debug pnams(); # endif debug mkemps(); } mkemps() { extern FILE *popen(); register FILE *mfd; register int i; char buf[BUFSIZ]; for (i = 0; i
This Usenet Oldnews Archive article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.
2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright© 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.


Goto NEXT article in NET.games Newsgroup
Return to NET.games index
Return to the Usenet Oldnews Archive index ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.