File indexing completed on 2024-11-24 03:43:16

0001 /*******************************************************************
0002  *
0003  * Copyright 2007  Aron Boström <c02ab@efd.lth.se>
0004  *
0005  * Bovo is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 2, or (at your option)
0008  * any later version.
0009  *
0010  * Bovo is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with Bovo; see the file COPYING.  If not, write to
0017  * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
0018  * Boston, MA 02110-1301, USA.
0019  *
0020  ********************************************************************/
0021 
0022 /**
0023  * @file aiaron.h declaring the AiAron class
0024  */
0025 
0026 #ifndef BOVO_AIARON_H
0027 #define BOVO_AIARON_H
0028 
0029 #include "../ai.h"
0030 
0031 /** namespace for AI stuff */
0032 namespace ai
0033 {
0034 
0035 class AiBoard;
0036 
0037 /**
0038  * Aron's implementation of the AI player
0039  */
0040 class AiAron : public Ai
0041 {
0042     Q_OBJECT
0043 public:
0044     explicit AiAron(const Dimension &dimension, KGameDifficultyLevel::StandardLevel skill, Player player);
0045     ~AiAron() override;
0046     void cancelAndWait() override;
0047 
0048 public Q_SLOTS:
0049     void changeBoard(const Move &move) override;
0050     void gameOver() override;
0051     void setSkill(KGameDifficultyLevel::StandardLevel skill) override;
0052     void slotMove() override;
0053 
0054 Q_SIGNALS:
0055     void move(const Move &move);
0056 
0057 private:
0058     /* Playing board  */
0059     AiBoard *m_board;
0060 
0061     /* AI Player id */
0062     Player m_player;
0063 };
0064 
0065 } /* namespace ai */
0066 
0067 #endif // BOVO_AIARON_H