This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Tortuga/server/player_manager.hpp
T

40 lines
638 B
C++

#ifndef PLAYERMANAGER_H_
#define PLAYERMANAGER_H_
#include "player.hpp"
#include <list>
#include <string>
class PlayerManager {
private:
//utilities
typedef std::list<Player*> PlayerList;
public:
PlayerManager() = default;
PlayerManager(int maxPlayers);
~PlayerManager();
void UpdateAll(int delta);
Player* New(int playerID, int channel, std::string handle, std::string avatar);
Player* Get(int playerID);
void Delete(int playerID);
void DeleteAll();
PlayerList* GetPlayerList() {
return &playerList;
}
private:
//utilities
//...
//members
PlayerList playerList;
int maxPlayers = 0;
int ticker = 0;
};
#endif