00001 /********************************************************************** 00002 * Copyright 2002 Jeff Rush <jrush@taupro.com> 00003 * Original Copyright 1979-2002 Udanax.com 00004 * 00005 * This file is part of the Udanax xanalogical storage system. 00006 * 00007 * Udanax is free software; you can redistribute it and/or modify it 00008 * under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * Udanax is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with Udanax; if not, write to the Free Software Foundation, 00019 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 **********************************************************************/ 00021 00030 /* Modification History: 00031 * $Log: players.h,v $ 00032 * Revision 1.2 2002/05/28 03:58:42 jrush 00033 * Sources modified to comply with GPL licensing. 00034 * 00035 * Revision 1.1 2002/04/12 09:38:24 jrush 00036 * Moved include/players.h to server/players.h 00037 * 00038 * Revision 1.7 2002/04/10 18:01:54 jrush 00039 * Renamed class typeisa to IStreamAddr. 00040 * 00041 * Revision 1.6 2002/04/09 21:45:46 jrush 00042 * Renamed class 'tumbler' to 'Tumbler', for consistency with Python sources, 00043 * and changed typeisa from typedef to a subclass, in preparation for cleaning 00044 * up the type/class tree. 00045 * 00046 * Revision 1.5 2002/04/06 15:00:34 jrush 00047 * Changed INT to just 'int'. 00048 * 00049 * Revision 1.4 2002/02/14 05:40:42 jrush 00050 * Cleaned up source: 00051 * 00052 * 1. ran thru the indent tool to achieve a standard look, 00053 * 2. added structured comments at top for use with DOxygen reporting 00054 * as well as CVS keywords, 00055 * 3. added #ifndef/#defines to prevent duplicate inclusions, 00056 * 4. insured all struct/union defs have names, 00057 * 5. centralized prototypes in protos.h, removing incomplete ones, 00058 * 6. cleaned up use of bool/BOOLEAN type to suit C++ type, 00059 * 7. fixed initializer nesting in tumbler constants. 00060 * 00061 */ 00062 00063 #ifndef __UDANAX_PLAYERS_H__ 00064 #define __UDANAX_PLAYERS_H__ 00065 00066 #include <sys/types.h> // For fd_set 00067 00068 /* 00069 * ** A structure is maintained with information on each player. */ 00070 00071 typedef struct _player { 00072 char *name; /* Player's name */ 00073 int userid; /* player's user id number */ 00074 int wantsout; /* Quit after this hand? */ 00075 int socket; /* To communicate with player on */ 00076 FILE *inp; 00077 FILE *outp; 00078 IStreamAddr account; /* xanadu host and account tumbler */ 00079 } PLAYER; 00080 00081 extern PLAYER player[]; 00082 00083 extern int n_players; /* current number of players (including computer) */ 00084 00085 extern int fdtoplayer[32]; 00086 extern fd_set inputfds; 00087 extern int nfds; 00088 extern int user; 00089 00090 #endif /* !__UDANAX_PLAYERS_H__*/
1.3.4