Cluedo Solver v1.0
Cluedo game solver making deductions.
Loading...
Searching...
No Matches
Cluedo::UI::AddInformationModal Class Reference

A modal used to add information to the solver. More...

#include <AddInformationModal.hpp>

Public Member Functions

 AddInformationModal (std::function< void(std::string &&, Solver &&)> on_learn_callback)
 
void reset ()
 
void show (Solver &solver)
 

Detailed Description

A modal used to add information to the solver.

This modal is split in two tabs as there are two types of information that can be learnt during a game:

  • Player card state: a player has a card or not
  • Suggestion: a player made a suggestion The first tab will prompt the user to input the player who has the card or not and the card in question. The second tab will prompt the user to input the suggestion made.

Constructor & Destructor Documentation

◆ AddInformationModal()

Cluedo::UI::AddInformationModal::AddInformationModal ( std::function< void(std::string &&, Solver &&)> on_learn_callback)
inlineexplicit

Constructs the modal.

Parameters
on_learn_callbackThe function to be called when the information is learnt succesfully.

Member Function Documentation

◆ reset()

void Cluedo::UI::AddInformationModal::reset ( )

Resets the modal data.

Note
Used when the modal has to be opened, so that the old data is lost.

◆ show()

void Cluedo::UI::AddInformationModal::show ( Solver & solver)

Shows the modal.

Parameters
solverThe solver that contains the game data.

The documentation for this class was generated from the following files: