Files
BattleCap/include/Player.h
ParkSuMin 4a1bae3f87
Some checks failed
BattleCap test mode / Build BattleCap (push) Failing after 18s
Add memory header for building project
2025-09-03 23:50:48 +03:00

29 lines
482 B
C++

#pragma once
#include <string>
#include <vector>
#include <memory>
#include "stdafx.h"
class Player {
private:
char name;
std::vector<std::unique_ptr<Infantry>> army;
double score;
public:
Player() : score(0.) {};
void points(double _score){
score += _score;
}
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;
}
};