-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from yihan-wa/dev
通讯组:对CAPI\cpp\proto中添加了编译后的文件
- Loading branch information
Showing
15 changed files
with
32,269 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
#ifndef AI_H | ||
#define AI_H | ||
|
||
#include "API.h" | ||
|
||
#undef GetMessage | ||
#undef SendMessage | ||
#undef PeekMessage | ||
|
||
class IAI | ||
{ | ||
public: | ||
virtual ~IAI() = default; | ||
IAI() = default; | ||
virtual void play(IShipAPI& api) = 0; | ||
virtual void play(ITeamAPI& api) = 0; | ||
}; | ||
|
||
using CreateAIFunc = std::unique_ptr<IAI> (*)(int32_t playerID); | ||
|
||
class AI : public IAI | ||
{ | ||
public: | ||
AI(int32_t pID) : | ||
IAI(), | ||
playerID(pID) | ||
{ | ||
} | ||
void play(IShipAPI& api) override; | ||
void play(ITeamAPI& api) override; | ||
|
||
private: | ||
int32_t playerID; | ||
}; | ||
|
||
#endif |
Empty file.
Oops, something went wrong.