Persists the world seed, the player and staff id counters (table WorldState) and the managed club's board state (table BoardState).
More...
#include <world_state_repository.h>
Persists the world seed, the player and staff id counters (table WorldState) and the managed club's board state (table BoardState).
◆ WorldStateRepository()
| WorldStateRepository::WorldStateRepository |
( |
std::shared_ptr< DatabaseConnection > |
db_conn | ) |
|
|
explicit |
◆ loadBoard()
| bool WorldStateRepository::loadBoard |
( |
BoardState & |
board | ) |
const |
Loads the board state; false when none is stored.
◆ loadNextStaffId()
| std::uint32_t WorldStateRepository::loadNextStaffId |
( |
| ) |
const |
Stored staff id counter; 0 when unknown (older saves).
◆ loadWorldState()
| bool WorldStateRepository::loadWorldState |
( |
std::uint64_t & |
seed, |
|
|
PlayerID & |
next_player_id |
|
) |
| const |
Loads the world state; false when the save predates it.
◆ saveBoard()
| void WorldStateRepository::saveBoard |
( |
const BoardState & |
board | ) |
const |
Writes the board state (a single row).
◆ saveWorldState()
| void WorldStateRepository::saveWorldState |
( |
std::uint64_t |
seed, |
|
|
PlayerID |
next_player_id, |
|
|
std::uint32_t |
next_staff_id |
|
) |
| const |
Writes the world state with the staff id counter (StaffID).
◆ db_conn
The documentation for this class was generated from the following files: