1er commit
This commit is contained in:
34
include/game/Team.h
Normal file
34
include/game/Team.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
|
||||
namespace td {
|
||||
namespace game {
|
||||
|
||||
class Player;
|
||||
|
||||
enum class TeamColor : std::int8_t{
|
||||
None = -1,
|
||||
Red,
|
||||
Blue
|
||||
};
|
||||
|
||||
class Team{
|
||||
private:
|
||||
std::vector<Player*> m_Players;
|
||||
TeamColor m_Color;
|
||||
public:
|
||||
Team(TeamColor color);
|
||||
|
||||
void addPlayer(Player* newPlayer);
|
||||
void removePlayer(const Player* player);
|
||||
|
||||
TeamColor getColor() const;
|
||||
|
||||
std::uint8_t getPlayerCount() const;
|
||||
};
|
||||
|
||||
} // namespace game
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user