initial commit, lordsawar source, slightly modified
[lordsawar] / src / ai_dummy.h
1 // Copyright (C) 2002, 2003, 2004, 2005 Ulf Lorenz
2 // Copyright (C) 2003 Michael Bartl
3 // Copyright (C) 2007, 2008, 2009 Ben Asselstine
4 // Copyright (C) 2007, 2008 Ole Laursen
5 //
6 //  This program is free software; you can redistribute it and/or modify
7 //  it under the terms of the GNU General Public License as published by
8 //  the Free Software Foundation; either version 3 of the License, or
9 //  (at your option) any later version.
10 //
11 //  This program is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 //  GNU Library General Public License for more details.
15 //
16 //  You should have received a copy of the GNU General Public License
17 //  along with this program; if not, write to the Free Software
18 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
19 //  02110-1301, USA.
20
21 #ifndef AI_DUMMY_H
22 #define AI_DUMMY_H
23
24 #include <string>
25 #include <list>
26 #include <gtkmm.h>
27
28 #include "real_player.h"
29
30 class XML_Helper;
31 class City;
32 class HeroProto;
33
34 //! A simple artificial intelligence Player suitable to be the neutral Player.
35 /** 
36  * This class is a dummy AI used for the neutral player. It just does, well,
37  * nothing.
38  */
39
40 class AI_Dummy : public RealPlayer
41 {
42     public:
43         /** 
44          * Make a new AI_Dummy player.
45          * 
46          * @param name         The name of the player.
47          * @param armyset      The Id of the player's Armyset.
48          * @param color        The player's colour.
49          * @param width        The width of the player's FogMap.
50          * @param height       The height of the player's FogMap.
51          * @param player_no    The Id of the player.  If this value is -1,
52          *                     the next free Id it used.
53          */
54         //! Default constructor.
55         AI_Dummy (std::string name, guint32 armyset, Gdk::Color color, 
56                   int width, int height, int player_no = -1);
57
58         //! Copy constructor.
59         AI_Dummy(const Player& player);
60         //! Loading constructor. See XML_Helper.
61         AI_Dummy(XML_Helper* helper);
62         //! Destructor.
63         ~AI_Dummy();
64         
65         virtual bool isComputer() const {return true;};
66         virtual void abortTurn();
67         virtual bool startTurn();
68         virtual void invadeCity(City* c);
69         virtual bool chooseHero(HeroProto *hero, City* c, int gold);
70         virtual Reward *chooseReward(Ruin *ruin, Sage *sage, Stack *stack);
71         virtual void heroGainsLevel(Hero * a);
72         virtual bool chooseTreachery (Stack *stack, Player *player, Vector <int> pos);
73         virtual Army::Stat chooseStat(Hero *hero);
74         virtual bool chooseQuest(Hero *hero);
75
76         void setDefensiveProduction(City *city);
77         void examineCities();
78
79     private:
80         //DATA
81 };
82
83 #endif // AI_DUMMY_H