HALTED: major overhaul for character
This commit is contained in:
11
src/game.h
11
src/game.h
@ -15,6 +15,7 @@ private:
|
||||
static const size_t MAX_LEVEL_CNT = 50;
|
||||
static const size_t MIN_LEVEL_CNT = 30;
|
||||
static const size_t DEFAULT_MAX_LEVEL = 5;
|
||||
static const size_t MAX_MSG_LENGTH = 300;
|
||||
|
||||
const feature enabled_features;
|
||||
|
||||
@ -23,6 +24,8 @@ private:
|
||||
logger *log;
|
||||
RNG *rng;
|
||||
|
||||
unsigned int curr_turn;
|
||||
|
||||
std::unique_ptr<character> player;
|
||||
std::vector<std::unique_ptr<level>> levels;
|
||||
|
||||
@ -30,6 +33,10 @@ private:
|
||||
size_t curr_level;
|
||||
|
||||
bool the_world;
|
||||
bool hostile_merchants;
|
||||
|
||||
// shrink if over 300
|
||||
std::string msg;
|
||||
public:
|
||||
game(const enum race starting_race,
|
||||
const feature enabled_features,
|
||||
@ -39,13 +46,15 @@ public:
|
||||
RNG *new_rng);
|
||||
game_status run();
|
||||
size_t get_curr_level() const;
|
||||
size_t get_curr_turn() const;
|
||||
const character *get_player() const;
|
||||
void print();
|
||||
private:
|
||||
result player_moves(game_command cmd);
|
||||
void new_level();
|
||||
void move_enemies();
|
||||
|
||||
result player_move_or_attack(const direction &dir);
|
||||
bool compare_characters(const character *&a, const character *&b);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user