changed team structure

This commit is contained in:
2021-08-21 11:46:21 +02:00
parent 7052edfef1
commit 88d2644219
8 changed files with 81 additions and 38 deletions

View File

@@ -1,5 +1,7 @@
#pragma once
#include "Types.h"
#include <vector>
#include <memory>
#include <algorithm>
@@ -15,10 +17,22 @@ enum class TeamColor : std::int8_t{
Blue
};
struct Spawn{
Direction direction;
std::int32_t x, y;
};
struct TeamCastle{
std::int32_t x, y;
std::uint16_t life = 1000;
};
class Team{
private:
std::vector<Player*> m_Players;
TeamColor m_Color;
Spawn m_Spawn;
TeamCastle m_TeamCastle;
public:
Team(TeamColor color);
@@ -27,6 +41,12 @@ public:
TeamColor getColor() const;
const Spawn& getSpawn() const {return m_Spawn;}
Spawn& getSpawn() {return m_Spawn;}
const TeamCastle& getCastle() const {return m_TeamCastle;}
TeamCastle& getCastle() {return m_TeamCastle;}
std::uint8_t getPlayerCount() const;
};