added option to read level data from file
This commit is contained in:
12
src/cc3k.h
12
src/cc3k.h
@ -1,6 +1,7 @@
|
||||
#ifndef __CC3K_H__
|
||||
#define __CC3K_H__
|
||||
|
||||
#include <string>
|
||||
#include "input.h"
|
||||
#include "output.h"
|
||||
#include "game.h"
|
||||
@ -9,6 +10,7 @@
|
||||
|
||||
class CC3K final {
|
||||
private:
|
||||
static const int DEFAULT_LVL_CNT = 5;
|
||||
const feature enabled_features;
|
||||
input *in;
|
||||
output *out;
|
||||
@ -17,9 +19,17 @@ private:
|
||||
game_result gresult;
|
||||
std::unique_ptr<game> curr_game;
|
||||
std::unique_ptr<menu> curr_menu;
|
||||
|
||||
std::vector<level_data> lvls;
|
||||
void proc_lvls(std::ifstream &data);
|
||||
void push_tile(const char ch, const position &pos, level_data &lvl);
|
||||
void number_rooms(level_data &lvl);
|
||||
size_t remap_pos(const position &pos);
|
||||
void number_block(std::string &map_data, const position &pos, int num);
|
||||
bool in_bounds(const position &pos);
|
||||
public:
|
||||
CC3K(const feature enabled_features,
|
||||
input *in, output *out, RNG *rng);
|
||||
input *in, output *out, RNG *rng, std::ifstream &data);
|
||||
game_status run();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user