finished the bulk of game
This commit is contained in:
12
src/game.h
12
src/game.h
@ -2,13 +2,14 @@
|
||||
#define __GAME_H__
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "constants.h"
|
||||
#include "display.h"
|
||||
#include "input.h"
|
||||
#include "rng.h"
|
||||
#include "characters.h"
|
||||
#include "level.h"
|
||||
#include "log.h"
|
||||
#include "player.h"
|
||||
|
||||
enum game_status : int;
|
||||
|
||||
class game final {
|
||||
private:
|
||||
@ -21,12 +22,11 @@ private:
|
||||
|
||||
input *in;
|
||||
display *out;
|
||||
logger *log;
|
||||
RNG *rng;
|
||||
|
||||
unsigned int curr_turn;
|
||||
|
||||
std::unique_ptr<character> player;
|
||||
std::unique_ptr<player_base> player;
|
||||
std::vector<std::unique_ptr<level>> levels;
|
||||
|
||||
size_t max_level;
|
||||
@ -42,7 +42,6 @@ public:
|
||||
const feature enabled_features,
|
||||
input *new_in,
|
||||
display *new_out,
|
||||
logger *new_log,
|
||||
RNG *new_rng);
|
||||
game_status run();
|
||||
size_t get_curr_level() const;
|
||||
@ -50,11 +49,8 @@ public:
|
||||
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