1er commit

This commit is contained in:
2021-08-21 10:14:47 +02:00
commit a99ecf7c2d
99 changed files with 66605 additions and 0 deletions

27
src/game/Team.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include "game/Player.h"
namespace td {
namespace game {
Team::Team(TeamColor color): m_Color(color){}
void Team::addPlayer(Player* newPlayer){
m_Players.push_back(newPlayer);
newPlayer->setTeamColor(m_Color);
}
void Team::removePlayer(const Player* player){
m_Players.erase(std::find(m_Players.begin(), m_Players.end(), player));
}
TeamColor Team::getColor() const{
return m_Color;
}
std::uint8_t Team::getPlayerCount() const{
return m_Players.size();
}
} // namespace game
} // namespace td