File indexing completed on 2024-10-06 06:48:46

0001 /* This file is part of KsirK.
0002    Copyright (C) 2005-2007 Gael de Chalendar <kleag@free.fr>
0003 
0004    KsirK is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU General Public
0006    License as published by the Free Software Foundation, either version 2
0007    of the License, or (at your option) any later version.
0008 
0009    This program is distributed in the hope that it will be useful,
0010    but WITHOUT ANY WARRANTY; without even the implied warranty of
0011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012    General Public License for more details.
0013 
0014    You should have received a copy of the GNU General Public License
0015    along with this program; if not, write to the Free Software
0016    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0017    02110-1301, USA
0018 */
0019 
0020 #ifndef KSIRK_GAMELOGICAIPLAYERIO_H
0021 #define KSIRK_GAMELOGICAIPLAYERIO_H
0022 
0023 #include "aiplayer.h"
0024 
0025 #define USE_UNSTABLE_LIBKDEGAMESPRIVATE_API
0026 #include <libkdegamesprivate/kgame/kgameio.h>
0027 
0028 namespace Ksirk {
0029 
0030 namespace GameLogic {
0031 
0032 #define AIPLAYERIO 32
0033 
0034 /**
0035   * This is the IO device used by AI players
0036   * @author Gaƫl de Chalendar (aka Kleag)
0037   */
0038 class AIPlayerIO : public KGameIO
0039 {
0040 public:
0041   /** Constructor of the IO device for the given AI player. */
0042   explicit AIPlayerIO(AIPlayer* aiplayer);
0043 
0044   /** Default destructor. */
0045   ~AIPlayerIO() override;
0046 
0047   /** 
0048     * The KGame IO devices must have a rtti function returning a value 
0049     * different for each different IO class. 
0050     */
0051   int rtti () const override {return AIPLAYERIO;}
0052 };
0053 
0054 }
0055 
0056 }
0057 
0058 #endif