2007-10-16 22:41:45 +00:00
|
|
|
#include "CEmptyAI.h"
|
2007-10-21 16:45:13 +00:00
|
|
|
#include <iostream>
|
2007-12-06 18:32:06 +00:00
|
|
|
void CEmptyAI::init(ICallback * CB)
|
2007-10-21 16:45:13 +00:00
|
|
|
{
|
|
|
|
cb = CB;
|
|
|
|
human=false;
|
2007-12-01 12:50:33 +00:00
|
|
|
playerID=cb->getMyColor();
|
|
|
|
serialID=cb->getMySerial();
|
2007-10-21 16:45:13 +00:00
|
|
|
std::cout << "EmptyAI initialized." << std::endl;
|
|
|
|
}
|
2007-10-16 22:41:45 +00:00
|
|
|
void CEmptyAI::yourTurn()
|
|
|
|
{
|
2008-07-27 17:07:37 +00:00
|
|
|
cb->endTurn();
|
2007-10-16 22:41:45 +00:00
|
|
|
}
|
2008-02-05 03:56:45 +00:00
|
|
|
void CEmptyAI::heroKilled(const CGHeroInstance *)
|
2007-10-16 22:41:45 +00:00
|
|
|
{
|
|
|
|
}
|
2008-02-05 03:56:45 +00:00
|
|
|
void CEmptyAI::heroCreated(const CGHeroInstance *)
|
2007-10-16 22:41:45 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
void CEmptyAI::heroMoved(const HeroMoveDetails &)
|
|
|
|
{
|
2008-08-13 00:44:31 +00:00
|
|
|
}
|
|
|
|
void CEmptyAI::heroGotLevel(const CGHeroInstance *hero, int pskill, std::vector<ui16> &skills, boost::function<void(ui32)> &callback)
|
|
|
|
{
|
|
|
|
callback(rand()%skills.size());
|
2007-10-16 22:41:45 +00:00
|
|
|
}
|