Cluedo Solver v1.0
Cluedo game solver making deductions.
Loading...
Searching...
No Matches
NewGameModal.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../Solver.hpp"
4#include "ErrorModal.hpp"
5
6#include <functional>
7#include <vector>
8
11
12namespace Cluedo {
13
14namespace UI {
15
20public:
24 explicit NewGameModal(std::function<void(Solver&&)> on_solver_created_callback)
25 : m_on_solver_created_callback(on_solver_created_callback) {}
26
29 void reset();
31 void show();
32
33private:
34 void show_number_of_players_input();
35 void show_players_section();
36 void show_buttons();
37
38 std::size_t m_player_count;
39 std::vector<PlayerData> m_players;
40 std::function<void(Solver&&)> m_on_solver_created_callback;
41 ErrorModal m_error_modal;
42};
43
44}
45
46}
The file that contains the definition of the Cluedo::UI::ErrorModal class.
The file that contains the definition of the Cluedo::Solver class.
The solver of a Cluedo game.
Definition Solver.hpp:24
A modal used to show an error message.
Definition ErrorModal.hpp:13
void reset()
Definition NewGameModal.cpp:13
NewGameModal(std::function< void(Solver &&)> on_solver_created_callback)
Definition NewGameModal.hpp:24
void show()
Shows the modal.
Definition NewGameModal.cpp:23