add bots
This commit is contained in:
@@ -3,27 +3,38 @@
|
||||
#include <client/IClientSocket.h>
|
||||
#include <client/PlayerManager.h>
|
||||
#include <td/common/StateMachine.h>
|
||||
#include <optional>
|
||||
|
||||
namespace td {
|
||||
namespace client {
|
||||
|
||||
class ClientState;
|
||||
class LoggingState;
|
||||
|
||||
class Client : public StateMachine<Client, void, float> {
|
||||
private:
|
||||
std::shared_ptr<IClientSocket> m_Socket;
|
||||
PlayerManager m_Players;
|
||||
std::optional<PlayerID> m_Id;
|
||||
|
||||
public:
|
||||
Client(const std::shared_ptr<IClientSocket>& a_Socket, const std::string& a_PlayerName);
|
||||
Client(const std::shared_ptr<IClientSocket>& a_Socket);
|
||||
~Client();
|
||||
|
||||
void SendPacket(const protocol::PacketBase& a_Packet);
|
||||
|
||||
void Disconnect();
|
||||
|
||||
const PlayerManager& GetPlayers() const {
|
||||
return m_Players;
|
||||
}
|
||||
|
||||
const std::optional<PlayerID> GetId() const {
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
friend class ClientState;
|
||||
friend class LoggingState;
|
||||
};
|
||||
|
||||
} // namespace client
|
||||
|
||||
Reference in New Issue
Block a user