8ab9ff8e7e5b651573e669859a401d8329a8871f
[capablanca.git] / lasker-2.2.3 / bots / mamer / Game.cc
1 //--------------------------------------------------------------------------
2 // Game.cc - Source file for the Game class
3 //
4 // Matthew E. Moses && Michael A. Long
5 //
6 // $Revision: 1.4 $
7 // $Date: 2002/07/02 00:05:19 $
8 //
9 // $Author: tridge $
10 // $Locker:  $
11 //
12 // $Log: Game.cc,v $
13 // Revision 1.4  2002/07/02 00:05:19  tridge
14 // got rid of a bunch of RCS tags now that its in CVS
15 //
16 // Revision 1.3  1998/09/10 19:57:17  mlong
17 // lots of little bug fixes and a few new features
18 //
19 // Revision 1.2  1998/04/29 15:23:19  mlong
20 // prepairing for the move to daimi
21 // new sorting routine.
22 //
23 // Revision 1.1  1997/07/18 15:42:13  chess
24 // Initial revision
25 //
26 //
27 //--------------------------------------------------------------------------
28
29 #include "Game.hh"
30
31 //- Constructor -----------------------------------------------------------
32 Game::Game(char *wn, char *bn, int t, int i, int r, char v) {
33   strcpy(whiteName, wn);
34   strcpy(blackName, bn);
35   time = t;
36   inc = i;
37   rated = r;
38   variation = v;
39
40   gameNumber = -1;
41 }
42
43 //- DeConstructor ---------------------------------------------------------
44 Game::~Game() {
45 }
46
47 //- IsGame -----------------------------------------------------------------
48 int Game::IsGame(char *whiteUser, char *blackUser, int t, int i, int r, char v) {
49     if(
50        (0 == strcasecmp(whiteUser, whiteName)) && 
51        (0 == strcasecmp(blackUser, blackName)) &&
52        (time == t) &&
53        (inc == i) &&
54        (rated == r) &&
55        (variation == v))
56         return(1);
57     else
58         return(0);
59 } //- End of IsGame