src/ai/NoAI/NoAI.hpp
author rubidium
Thu, 15 Mar 2007 13:50:58 +0000
branchnoai
changeset 9405 df6f3b4b0038
parent 9390 4042c17c8055
child 9410 286fcd8edc64
permissions -rw-r--r--
(svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
9360
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
     1
/* $Id$ */
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
     2
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
     3
/** @file NoAI.hpp declarations of the class for a simple C++ AI that will never be an AI */
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
     4
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
     5
#ifndef NOAI_HPP
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
     6
#define NOAI_HPP
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
     7
9390
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
     8
#include "../core/ai_factory.hpp"
9361
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents: 9360
diff changeset
     9
#include "../core/ai_controller.hpp"
9360
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
    10
#include "../core/ai_base.hpp"
9405
df6f3b4b0038 (svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents: 9390
diff changeset
    11
#include "../core/ai_cargo.hpp"
9374
61379e9b2393 (svn r9161) [NoAI] -Add: functions to get/set company related information: loan, bank balance, company value and company name.
rubidium
parents: 9361
diff changeset
    12
#include "../core/ai_company.hpp"
9405
df6f3b4b0038 (svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents: 9390
diff changeset
    13
#include "../core/ai_industry.hpp"
9384
188a770476e0 (svn r9174) [NoAI] -Codechange: call all functions that are provided by the AI wrappers, so it can later be used for regression testing.
rubidium
parents: 9374
diff changeset
    14
#include "../core/ai_map.hpp"
188a770476e0 (svn r9174) [NoAI] -Codechange: call all functions that are provided by the AI wrappers, so it can later be used for regression testing.
rubidium
parents: 9374
diff changeset
    15
#include "../core/ai_town.hpp"
9360
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
    16
9361
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents: 9360
diff changeset
    17
class NoAI: public AIController {
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents: 9360
diff changeset
    18
private:
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents: 9360
diff changeset
    19
	AIBase base;
9405
df6f3b4b0038 (svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents: 9390
diff changeset
    20
	AICargo cargo;
9374
61379e9b2393 (svn r9161) [NoAI] -Add: functions to get/set company related information: loan, bank balance, company value and company name.
rubidium
parents: 9361
diff changeset
    21
	AICompany company;
9405
df6f3b4b0038 (svn r9202) [NoAI] -Add: some initial functions for cargo and industries.
rubidium
parents: 9390
diff changeset
    22
	AIIndustry industry;
9384
188a770476e0 (svn r9174) [NoAI] -Codechange: call all functions that are provided by the AI wrappers, so it can later be used for regression testing.
rubidium
parents: 9374
diff changeset
    23
	AIMap map;
188a770476e0 (svn r9174) [NoAI] -Codechange: call all functions that are provided by the AI wrappers, so it can later be used for regression testing.
rubidium
parents: 9374
diff changeset
    24
	AITown town;
9361
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents: 9360
diff changeset
    25
9360
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
    26
public:
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
    27
	/* virtual */ void GameLoop();
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
    28
};
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
    29
9390
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    30
class FNoAI: public AIFactory<FNoAI> {
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    31
public:
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    32
	const char   *GetAuthor()      { return "OpenTTD Dev Team"; }
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    33
	const char   *GetName()        { return "NoAI"; }
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    34
	const char   *GetDescription() { return "Rather simple AI that tests all the functions of the AI layer."; }
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    35
	int           GetVersion()     { return 1; }
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    36
	const char   *GetDate()        { return "2007-03-14"; }
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    37
	AIController *CreateInstance() { return new NoAI(); }
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    38
};
4042c17c8055 (svn r9182) [NoAI] -Add: added AIFactory template which all AIs must define, as this
truelight
parents: 9384
diff changeset
    39
9360
c20d0a9e0a5c (svn r9142) [NoAI] -Add: added initial code for AI-layer system
truelight
parents:
diff changeset
    40
#endif /* NOAI_HPP */