File indexing completed on 2024-04-21 04:04:00

0001 /*
0002     SPDX-FileCopyrightText: 2013 Denis Kuplyakov <dener.kup@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "kreversiplayer.h"
0008 
0009 KReversiPlayer::KReversiPlayer(ChipColor color, const QString &name,
0010                                bool hintAllowed, bool undoAllowed):
0011     m_state(UNKNOWN), m_color(color), m_name(name),
0012     m_hintAllowed(hintAllowed), m_hintCount(0), m_undoAllowed(undoAllowed),
0013     m_undoCount(0)
0014 {
0015 }
0016 
0017 ChipColor KReversiPlayer::getColor() const
0018 {
0019     return m_color;
0020 }
0021 
0022 QString KReversiPlayer::getName() const
0023 {
0024     return m_name;
0025 }
0026 
0027 bool KReversiPlayer::isHintAllowed() const
0028 {
0029     return m_hintAllowed;
0030 }
0031 
0032 void KReversiPlayer::hintUsed()
0033 {
0034     m_hintCount++;
0035 }
0036 
0037 int KReversiPlayer::getHintsCount()
0038 {
0039     return m_hintCount;
0040 }
0041 
0042 bool KReversiPlayer::isUndoAllowed() const
0043 {
0044     return m_undoAllowed;
0045 }
0046 
0047 void KReversiPlayer::undoUsed()
0048 {
0049     m_undoCount++;
0050 }
0051 
0052 int KReversiPlayer::getUndoCount()
0053 {
0054     return m_undoCount;
0055 }
0056 
0057 #include "moc_kreversiplayer.cpp"