Skip to content

Commit

Permalink
Merge pull request #25 from yihan-wa/dev
Browse files Browse the repository at this point in the history
通讯组:对CAPI\cpp\proto中添加了编译后的文件
  • Loading branch information
SERENCH authored Oct 19, 2024
2 parents 7335f07 + 09137f4 commit efb64f0
Show file tree
Hide file tree
Showing 15 changed files with 32,269 additions and 10 deletions.
37 changes: 37 additions & 0 deletions CAPI/cpp/API/include/AI.h
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 added CAPI/cpp/API/include/API.h
Empty file.
Loading

0 comments on commit efb64f0

Please sign in to comment.