CEmptyAI.cpp 590 B

1234567891011121314151617181920212223242526
  1. #include "CEmptyAI.h"
  2. #include <iostream>
  3. void CEmptyAI::init(CCallback * CB)
  4. {
  5. cb = CB;
  6. human=false;
  7. playerID=cb->getMyColor();
  8. std::cout << "EmptyAI initialized." << std::endl;
  9. }
  10. void CEmptyAI::yourTurn()
  11. {
  12. cb->endTurn();
  13. }
  14. void CEmptyAI::heroKilled(const CGHeroInstance *)
  15. {
  16. }
  17. void CEmptyAI::heroCreated(const CGHeroInstance *)
  18. {
  19. }
  20. void CEmptyAI::heroMoved(const TryMoveHero& TMH)
  21. {
  22. }
  23. void CEmptyAI::heroGotLevel(const CGHeroInstance *hero, int pskill, std::vector<ui16> &skills, boost::function<void(ui32)> &callback)
  24. {
  25. callback(rand()%skills.size());
  26. }