Реструктуризация проекта
This commit is contained in:
17
include/game.h
Normal file
17
include/game.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "player.h"
|
||||
#pragma once
|
||||
|
||||
class Game {
|
||||
public:
|
||||
void run();
|
||||
|
||||
private:
|
||||
bool isRunning = true;
|
||||
Player player;
|
||||
|
||||
void showMainMenu();
|
||||
void processCommand();
|
||||
void render();
|
||||
};
|
||||
|
||||
#pragma once
|
||||
20
include/player.h
Normal file
20
include/player.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Player {
|
||||
public:
|
||||
std::string name = "Character Name";
|
||||
int hp = 100;
|
||||
int atk = 1;
|
||||
int gold = 0;
|
||||
int currentLocation = 1;
|
||||
int weaponId = 101;
|
||||
std::vector<int> items;
|
||||
|
||||
Player() {};
|
||||
Player(std::string _name);
|
||||
void showStats();
|
||||
};
|
||||
|
||||
#pragma once
|
||||
Reference in New Issue
Block a user