You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

AI.h 457 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #ifndef AI_H
  3. #define AI_H
  4. #include "API.h"
  5. // 暂定版本:Human和Butcher全部继承AI类,
  6. class IAI
  7. {
  8. public:
  9. IAI()
  10. {
  11. }
  12. virtual void play(IHumanAPI& api) = 0;
  13. virtual void play(IButcherAPI& api) = 0;
  14. };
  15. using CreateAIFunc = std::unique_ptr<IAI> (*)();
  16. class AI : public IAI
  17. {
  18. public:
  19. AI() :
  20. IAI()
  21. {
  22. }
  23. void play(IHumanAPI& api) override;
  24. void play(IButcherAPI& api) override;
  25. };
  26. #endif