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
12
class
Game
13
{
14
15
public
:
16
Game
(
IOText
& io);
17
18
void
intro
();
19
void
lossMessage
()
const
;
20
21
bool
isLost
()
const
;
22
23
Player
&
getMainPlayer
();
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
Game
Definition:
game.h:13
Game::getMainPlayer
Player & getMainPlayer()
Definition:
game.cpp:13
Game::lossMessage
void lossMessage() const
Definition:
game.cpp:40
Game::isLost
bool isLost() const
Definition:
game.cpp:9
Game::isPlayerAlive
bool isPlayerAlive() const
Definition:
game.cpp:11
Game::intro
void intro()
Definition:
game.cpp:34
Game::setMainPlayerName
void setMainPlayerName()
Definition:
game.cpp:17
Game::isValidName
const bool isValidName(std::string_view name) const
Definition:
game.cpp:29
IOText
Text-based input/output interface for terminal interaction.
Definition:
iotext.h:20
Player
Player-controlled entity with a persistent deck.
Definition:
player.h:23
Text
Lightweight text lookup service backed by a JSON file.
Definition:
text.h:17
iotext.h
player.h
text.h
game_system
game.h
Generated by
1.9.6