Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/ai/src/ai/ai_engine.cc @ 10041

Last change on this file since 10041 was 10041, checked in by tfahrni, 17 years ago

Tried to make some progress with the AI..

File size: 1.1 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13   ### File Specific:
14   main-programmer: Patrick Boenzli
15   co-programmer:
16*/
17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI
18
19#include "ai_engine.h"
20#include "debug.h"
21
22AIEngine* AIEngine::singletonRef = NULL;
23
24
25AIEngine::AIEngine()
26{}
27
28AIEngine::~AIEngine()
29{}
30
31
32
33/*AITeam* AIEngine::newTeam()
34{
35        AITeam* newTeam=new AITeam;
36        teams.push_back(newTeam);
37        return newTeam;
38}*/
39int AIEngine::newTeam()
40{
41        AITeam* newTeam=new AITeam;
42        teams.push_back(newTeam);
43        return teams.size()-1;
44}
45
46
47
48AITeam* AIEngine::getTeam(int aiTeamNumber)
49{
50        //if(teams.size()>aiTeamNumber)
51        return teams.at(aiTeamNumber);
52        //return NULL;
53}
54
55
56
57void AIEngine::process()
58{
59        int teamCount=teams.size();
60        for(int i=0; i < teamCount; i++ )
61        {
62        //std::cout << "Processing Team " << i <<  "...\n";
63        teams.at(i)->process();
64        }
65}
Note: See TracBrowser for help on using the repository browser.