finished the bulk of game

This commit is contained in:
2024-07-14 21:32:41 -04:00
parent b3475b7530
commit af8bc4112c
110 changed files with 1876 additions and 1481 deletions

View File

@ -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