Fix mamer crash on listmanagers command
[capablanca.git] / lasker-2.2.3 / bots / mamer / Player.cc
1 //--------------------------------------------------------------------------
2 // Player.cc - Source file for the Player class
3 //
4 // Matthew E. Moses && Michael A. Long
5 //
6 // $Revision: 1.4 $
7 // $Date: 1998/09/10 19:57:17 $
8 //
9 // $Author: mlong $
10 // $Locker:  $
11 //
12 // $Log: Player.cc,v $
13 // Revision 1.4  1998/09/10 19:57:17  mlong
14 // lots of little bug fixes and a few new features
15 //
16 // Revision 1.3  1998/02/12 18:44:04  mlong
17 // ..\7f
18 //
19 // Revision 1.2  1997/10/08 21:03:35  chess
20 // preparing for move to oracle machine at eworks.
21 //
22 // Revision 1.1  1997/05/16 03:22:36  chess
23 // Initial revision
24 //
25 // Revision 1.1  1997/05/14 17:00:30  chess
26 // Initial revision
27 //
28 //
29 //--------------------------------------------------------------------------
30
31 // static char RCSid[] = "$Id: Player.cc,v 1.4 1998/09/10 19:57:17 mlong Exp $";
32
33 #include "Player.hh"
34
35 //- Constructor -----------------------------------------------------------
36 Player::Player(char *n, int wt) {
37   strcpy(name, n);
38   value = wt;
39 }
40
41 //- Constructor -----------------------------------------------------------
42 Player::Player(char *n, float wt) {
43   strcpy(name, n);
44   floatValue = wt;
45 }
46
47 //- Constructor -----------------------------------------------------------
48 Player::Player(char *n, double wt) {
49   strcpy(name, n);
50   floatValue = wt;
51 }
52
53 //- Constructor -----------------------------------------------------------
54 Player::Player(char *n, float f, int i) {
55   strcpy(name, n);
56   floatValue = f;
57   value = i;
58 }
59
60 //- Constructor -----------------------------------------------------------
61 Player::Player(char *n, float f, int i, int r) {
62   strcpy(name, n);
63   floatValue = f;
64   value = i;
65   rating = r;
66 }
67
68 //- DeConstructor ---------------------------------------------------------
69 Player::~Player() {
70 }
71
72 //- IsPlayer -----------------------------------------------------------------
73 int Player::IsPlayer(char *user) {
74     if(0 == strcasecmp(user, name))
75         return(1);
76     else
77         return(0);
78 } //- End of IsPlayer