1 ////////////////////////////////////////////////////////////////////////////////
2 // Scorched3D (c) 2000-2009
4 // This file is part of Scorched3D.
6 // Scorched3D 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 2 of the License, or
9 // (at your option) any later version.
11 // Scorched3D 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 General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with Scorched3D; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ////////////////////////////////////////////////////////////////////////////////
21 #if !defined(AFX_TankAI_H__5F21C9C7_0F71_4CCC_ABB9_976CF0A5C5EC__INCLUDED_)
22 #define AFX_TankAI_H__5F21C9C7_0F71_4CCC_ABB9_976CF0A5C5EC__INCLUDED_
24 #include <engine/ScorchedCollisionIds.h>
25 #include <common/Vector.h>
26 #include <common/ToolTip.h>
39 virtual TankAI
*createCopy(Tank
*tank
) = 0;
42 virtual bool parseConfig(XMLNode
*node
);
45 virtual const char *getName() { return name_
.c_str(); }
46 virtual const char *getDescription() { return description_
.c_str(); }
47 virtual ToolTip
*getToolTip();
49 // Notification of actions to perform
50 virtual void newMatch() = 0;
51 virtual void newGame() = 0;
52 virtual void playMove() = 0;
53 virtual void buyAccessories() = 0;
54 virtual void autoDefense() = 0;
56 // Notification of actions happened
57 virtual void tankHurt(Weapon
*weapon
, float damage
,
58 unsigned int damaged
, unsigned int firer
) = 0;
59 virtual void shotLanded(ScorchedCollisionId collision
,
60 Weapon
*weapon
, unsigned int firer
,
61 Vector
&position
) = 0;
63 // Indicates if this computer ai is available for choice by
64 // the random tank ai type
65 virtual bool availableForRandom() { return availableForRandom_
; }
66 virtual bool availableForPlayers() { return availableForPlayers_
; }
69 std::string name_
, description_
;
70 bool availableForRandom_
;
71 bool availableForPlayers_
;
76 #endif // !defined(AFX_TankAI_H__5F21C9C7_0F71_4CCC_ABB9_976CF0A5C5EC__INCLUDED_)