1/*******************************************************************
2 *
3 * Copyright 2013 Denis Kuplyakov <dener.kup@gmail.com>
4 *
5 * This file is part of the KDE project "KReversi"
6 *
7 * KReversi is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * KReversi is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with KReversi; see the file COPYING. If not, write to
19 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 *
22 ********************************************************************/
23
24#include <kreversiplayer.h>
25
26KReversiPlayer::KReversiPlayer(ChipColor color, QString name,
27 bool hintAllowed, bool undoAllowed):
28 m_state(UNKNOWN), m_color(color), m_name(name),
29 m_hintAllowed(hintAllowed), m_hintCount(0), m_undoAllowed(undoAllowed),
30 m_undoCount(0)
31{
32}
33
34ChipColor KReversiPlayer::getColor() const
35{
36 return m_color;
37}
38
39QString KReversiPlayer::getName() const
40{
41 return m_name;
42}
43
44bool KReversiPlayer::isHintAllowed() const
45{
46 return m_hintAllowed;
47}
48
49void KReversiPlayer::hintUsed()
50{
51 m_hintCount++;
52}
53
54int KReversiPlayer::getHintsCount()
55{
56 return m_hintCount;
57}
58
59bool KReversiPlayer::isUndoAllowed() const
60{
61 return m_undoAllowed;
62}
63
64void KReversiPlayer::undoUsed()
65{
66 m_undoCount++;
67}
68
69int KReversiPlayer::getUndoCount()
70{
71 return m_undoCount;
72}
73