CardGame
Rogue-like card videogame
Loading...
Searching...
No Matches
game.h
Go to the documentation of this file.
1#ifndef GAME_H
2#define GAME_H
3
4#include "entities/player.h"
5#include "ui/iotext.h"
6#include "ui/text.h"
7
8#include <memory>
9#include <string>
10#include <string_view>
11
12class Game
13{
14
15 public:
16 Game(IOText& io);
17
18 void intro();
19 void lossMessage() const;
20
21 bool isLost() const;
22
24 const Player& getMainPlayer() const;
25 void setMainPlayerName();
26 const bool isValidName(std::string_view name) const;
27 bool isPlayerAlive() const;
28
29 private:
30 IOText& m_io;
31 Text m_text{};
32 Player m_mainPlayer{};
33};
34
35#endif // GAME_H
Definition: game.h:13
Player & getMainPlayer()
Definition: game.cpp:13
void lossMessage() const
Definition: game.cpp:40
bool isLost() const
Definition: game.cpp:9
bool isPlayerAlive() const
Definition: game.cpp:11
void intro()
Definition: game.cpp:34
void setMainPlayerName()
Definition: game.cpp:17
const bool isValidName(std::string_view name) const
Definition: game.cpp:29
Text-based input/output interface for terminal interaction.
Definition: iotext.h:20
Player-controlled entity with a persistent deck.
Definition: player.h:23
Lightweight text lookup service backed by a JSON file.
Definition: text.h:17