home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / src / xconq-7.1.0 / kernel / player.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-07  |  1.6 KB  |  42 lines  |  [TEXT/R*ch]

  1. /* Definitions for players in Xconq.
  2.    Copyright (C) 1992, 1993, 1994 Stanley T. Shebs.
  3.  
  4. Xconq is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.  See the file COPYING.  */
  8.  
  9. typedef struct a_player {
  10.     short id;                 /* unique id for the player */
  11.     char *name;               /* proper name of the player */
  12.     char *configname;         /* name of a particular configuration */
  13.     char *displayname;        /* name of the desired display */
  14.     char *aitypename;         /* name of an AI type */
  15.     short advantage;          /* player's desired initial advantage */
  16.     char *password;           /* encrypted password of the player */
  17.     struct a_side *side;      /* the side being played */
  18.     struct a_player *next;    /* pointer to the next player */
  19. } Player;
  20.  
  21. /* This is the mapping between players and sides. */
  22.  
  23. typedef struct {
  24.     struct a_side *side;      /* the side */
  25.     struct a_player *player;  /* the player assigned to the side */
  26.     int locked;               /* true if the assignment can't be changed */
  27. } Assign;
  28.  
  29. /* Iteration over all players. */
  30.  
  31. #define for_all_players(v) for (v = playerlist; v != NULL; v = v->next)
  32.  
  33. extern Player *playerlist;
  34. extern Player *last_player;
  35.  
  36. extern Assign *assignments;
  37.  
  38. extern Player *add_player PARAMS ((void));
  39. extern Player *find_player PARAMS ((int n));
  40. extern void canonicalize_player PARAMS ((Player *player));
  41. extern char *player_desig PARAMS ((Player *player));
  42.