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 519 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #ifndef AI_H
  3. #define AI_H
  4. #include "API.h"
  5. class IAI
  6. {
  7. public:
  8. virtual ~IAI() = default;
  9. IAI() = default;
  10. virtual void play(IStudentAPI& api) = 0;
  11. virtual void play(ITrickerAPI& api) = 0;
  12. };
  13. using CreateAIFunc = std::unique_ptr<IAI> (*)(int64_t playerID);
  14. class AI : public IAI
  15. {
  16. public:
  17. AI(int64_t pID) :
  18. IAI(),
  19. playerID(pID)
  20. {
  21. }
  22. void play(IStudentAPI& api) override;
  23. void play(ITrickerAPI& api) override;
  24. private:
  25. int64_t playerID;
  26. };
  27. #endif