kreversihumanplayer.h 1.77 KB
Newer Older
Denis Kuplyakov's avatar
Denis Kuplyakov committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*******************************************************************
 *
 * Copyright 2013 Denis Kuplyakov <dener.kup@gmail.com>
 *
 * This file is part of the KDE project "KReversi"
 *
 * KReversi 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, or (at your option)
 * any later version.
 *
 * KReversi is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with KReversi; see the file COPYING.  If not, write to
 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 ********************************************************************/

Denis Kuplyakov's avatar
Denis Kuplyakov committed
24 25 26
#ifndef KREVERSIHUMANPLAYER_H
#define KREVERSIHUMANPLAYER_H

27
#include "kreversiplayer.h"
Denis Kuplyakov's avatar
Denis Kuplyakov committed
28

29 30 31 32 33
/**
 * Represents human player. Implements KReversiPlayer.
 *
 * @see KReversiPlayer
 */
Denis Kuplyakov's avatar
Denis Kuplyakov committed
34 35 36 37
class KReversiHumanPlayer : public KReversiPlayer
{
    Q_OBJECT
public:
38 39 40
    /**
     * Constructs Human player with specified @p color and @p name
     */
Laurent Montel's avatar
Laurent Montel committed
41
    explicit KReversiHumanPlayer(ChipColor color, const QString &name);
Denis Kuplyakov's avatar
Denis Kuplyakov committed
42 43

    /**
44
     *  Overridden slots from @see KReversiPlayer
Denis Kuplyakov's avatar
Denis Kuplyakov committed
45
     */
46 47 48 49
    void prepare(KReversiGame *game) override;
    void takeTurn() override;
    void skipTurn() override;
    void gameOver() override;
Denis Kuplyakov's avatar
Denis Kuplyakov committed
50

51
Q_SIGNALS:
Denis Kuplyakov's avatar
Denis Kuplyakov committed
52

53
public Q_SLOTS:
Denis Kuplyakov's avatar
Denis Kuplyakov committed
54 55 56 57 58 59 60 61 62 63 64
    /**
     *  Using it to get information from UI.
     *  @param move Move that player has made.
     */
    void onUICellClick(KReversiPos move);

private:

};

#endif // KREVERSIHUMANPLAYER_H