-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTurnManager.hpp
More file actions
33 lines (27 loc) · 859 Bytes
/
TurnManager.hpp
File metadata and controls
33 lines (27 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
// =========================
// TurnManager
// =========================
// Tracks round number and the ordered queue of parties for
// each combat round. Parties are sorted by average member
// speed (fastest acts first). Defeated parties are skipped.
#include "Types.hpp"
#include <vector>
#include <cstddef>
class TurnManager {
private:
std::vector<PartyPtr> partyQueue;
std::size_t currentPartyIndex;
int round;
public:
// Constructor
TurnManager();
// Getters
int getRound() const;
std::size_t getCurrentPartyIndex() const;
const std::vector<PartyPtr>& getPartyQueue() const;
// Methods
void buildOrder(const std::vector<PartyPtr>& parties);
PartyPtr nextParty();
void resetRound();
};