feat: fast forward

This commit is contained in:
2025-07-30 17:52:54 +02:00
parent 56a43d7a60
commit 2e556e0d45
12 changed files with 164 additions and 31 deletions

View File

@@ -80,7 +80,29 @@ public:
std::uint8_t GetPlayerCount() const;
};
typedef std::array<Team, 2> TeamList;
struct TeamList {
std::array<Team, 2> m_Teams;
TeamList() : m_Teams{Team{TeamColor::Red}, Team{TeamColor::Blue}}{
}
Team& operator[](std::size_t a_Index) {
return m_Teams[a_Index];
}
Team& operator[](TeamColor a_Index) {
return m_Teams[static_cast<std::size_t>(a_Index)];
}
const Team& operator[](std::size_t a_Index) const {
return m_Teams[a_Index];
}
const Team& operator[](TeamColor a_Index) const {
return m_Teams[static_cast<std::size_t>(a_Index)];
}
};
} // namespace game
} // namespace td