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 <============ # <STDIO.H INCLUDE>

# 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
<HR>
This Usenet Oldnews Archive
article may be copied and distributed freely, provided:
<P>
1. There is no money collected for the text(s) of the articles.
<BR>
2. The following notice remains appended to each copy:
<P>
<EM>The Usenet Oldnews Archive: Compilation Copyright&copy 1981, 1996
<BR> Bruce Jones, Henry Spencer, David Wiseman.</EM>
<P>
<HR>
Goto <A HREF="82.04.30_watarts.1234_net.games.trivia.html">NEXT</A> article in NET.games Newsgroup
<BR>Return to <A HREF="NET.games-index.html">NET.games index</A>
<BR>Return to the
       <A HREF="../index.html">Usenet Oldnews Archive index</A>
</HTML>

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
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.