29 lines
740 B
C++
29 lines
740 B
C++
#ifndef __LOG_H__
|
|
#define __LOG_H__
|
|
#include <fstream>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <memory>
|
|
#include "constants.h"
|
|
#include "characters.h"
|
|
#include "objects.h"
|
|
|
|
class logger final {
|
|
private:
|
|
std::ofstream out;
|
|
std::vector<char> display;
|
|
public:
|
|
logger(std::ofstream &&new_out);
|
|
|
|
// called once every turn
|
|
void render();
|
|
void print_char(const position &pos, const char ch);
|
|
void print_str(const position &pos, const std::string &str);
|
|
void print_turn(const unsigned turn);
|
|
void print_player(std::unique_ptr<character> &player);
|
|
void print_chlist(const character_list &chlist);
|
|
void print_potions(const potion_list &potions);
|
|
};
|
|
|
|
#endif
|