Debug information about positions of units

Random position for flag and enemy (function Random)
This commit is contained in:
2025-07-07 17:42:31 +03:00
parent 253e1cf423
commit 7da1909c76
7 changed files with 110 additions and 52 deletions

View File

@@ -9,13 +9,17 @@ private:
std::vector<std::unique_ptr<Infantry>> army;
double score;
public:
Player() {
score = 0.;
for (auto i = 0; i < 4; ++i) {
army.push_back(std::make_unique<Infantry>());
}
}
Player() : score(0.) {};
std::vector<std::unique_ptr<Infantry>>& get_army() {
return army;
}
void set_army(int x, int y) {
army.push_back(std::make_unique<Infantry>(x, y));
}
void set_name(char _name) {
name = _name;
}
};