summaryrefslogtreecommitdiffstats
path: root/knights/challenge_game.cpp
blob: f1bd9a84d2ae3e305689447f76090878b2f0f745 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/***************************************************************************
                          game.cpp  -  description
                             -------------------
    begin                : Mon Jan 7 2002
    copyright            : (C) 2003 by Eric Faccer
    email                : e.faccer@qut.edu.au
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <tqapplication.h>
#include "challenge_game.h"


Challenge_Game::Challenge_Game(TQString seeker, TQString seeker_rating, TQString match_kind, TQString rated, TQString time, TQString incr, TQString uid)
: _player(seeker), _match_type(match_kind), _is_rated(rated)
{
	_id = uid.toInt();
	if( seeker_rating == "++++" )
		_player_rating = 0;
	else
		_player_rating = seeker_rating.toInt();
	_clock = time.toInt();
	_increment = incr.toInt();
	if( _is_rated == "unrated" )
		_rated = false;
	else
		_rated = true;
}