Player's turn complete

This commit is contained in:
2025-07-09 17:27:51 +03:00
parent 5577f14f5b
commit d4d30ae1fa
4 changed files with 100 additions and 71 deletions

View File

@@ -6,6 +6,7 @@
constexpr auto SIZE = 10;
constexpr auto SIZE_FOR_ARRAY = SIZE - 1;
constexpr auto ARMY = 5;
constexpr auto FLAGS = 3;
class Game {
private:
@@ -27,6 +28,8 @@ public:
void play();
private:
bool handleUnitSelection(const auto&, size_t&, int&, int&);
bool handleUnitMovement(auto, int&, int&);
void Random(char);
void clearScreen();
void print_field(int, int);

View File

@@ -11,6 +11,9 @@ private:
public:
Player() : score(0.) {};
void points(double _score){
score += _score;
}
std::vector<std::unique_ptr<Infantry>>& get_army() {
return army;
}

View File

@@ -12,6 +12,14 @@
#include "Game.h"
#include "Player.h"
// TODO
/*enum class State {
SELECT_UNIT,
MOVE_UNIT,
ENEMY_TURN
};
*/
enum KEY_CODES
{
ESC_KEY = 27,