File indexing completed on 2024-03-24 04:06:39

0001 /*
0002     SPDX-FileCopyrightText: 2013 Denis Kuplyakov <dener.kup@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef KREVERSIHUMANPLAYER_H
0008 #define KREVERSIHUMANPLAYER_H
0009 
0010 #include "kreversiplayer.h"
0011 
0012 /**
0013  * Represents human player. Implements KReversiPlayer.
0014  *
0015  * @see KReversiPlayer
0016  */
0017 class KReversiHumanPlayer : public KReversiPlayer
0018 {
0019     Q_OBJECT
0020 public:
0021     /**
0022      * Constructs Human player with specified @p color and @p name
0023      */
0024     explicit KReversiHumanPlayer(ChipColor color, const QString &name);
0025 
0026     /**
0027      *  Overridden slots from @see KReversiPlayer
0028      */
0029     void prepare(KReversiGame *game) override;
0030     void takeTurn() override;
0031     void skipTurn() override;
0032     void gameOver() override;
0033 
0034 Q_SIGNALS:
0035 
0036 public Q_SLOTS:
0037     /**
0038      *  Using it to get information from UI.
0039      *  @param move Move that player has made.
0040      */
0041     void onUICellClick(KReversiPos move);
0042 
0043 private:
0044 
0045 };
0046 
0047 #endif // KREVERSIHUMANPLAYER_H