RosettaStone::PlayerTasks::ChooseTask Class Reference

ChooseTask class. More...

#include <Rosetta/Tasks/PlayerTasks/ChooseTask.hpp>

Inheritance diagram for RosettaStone::PlayerTasks::ChooseTask:
RosettaStone::ITask

Public Member Functions

 ChooseTask (std::vector< std::size_t > choices)
 
TaskID GetTaskID () const override
 
- Public Member Functions inherited from RosettaStone::ITask
 ITask ()=default
 Default constructor. More...
 
 ITask (EntityType entityType)
 
 ITask (Entity *source, Entity *target)
 
 ITask (EntityType entityType, Entity *source, Entity *target)
 
virtual ~ITask ()=default
 Default destructor. More...
 
 ITask (const ITask &task)=default
 Default copy constructor. More...
 
 ITask (ITask &&task)=default
 Default move constructor. More...
 
ITaskoperator= (const ITask &task)=default
 Default copy assignment operator. More...
 
ITaskoperator= (ITask &&task)=default
 Default move assignment operator. More...
 
EntityType GetEntityType () const
 
void SetSource (Entity *source)
 
void SetTarget (Entity *target)
 
TaskStatus Run (Player &player)
 

Static Public Member Functions

static ChooseTask Mulligan (Player &player, std::vector< std::size_t > choices)
 

Additional Inherited Members

- Static Public Attributes inherited from RosettaStone::ITask
template<typename T >
static constexpr bool isTask
 
- Protected Attributes inherited from RosettaStone::ITask
EntityType m_entityType = EntityType::EMPTY
 
Entitym_source = nullptr
 
Entitym_target = nullptr
 

Detailed Description

ChooseTask class.

This class represents the task for choosing cards.

Constructor & Destructor Documentation

◆ ChooseTask()

RosettaStone::PlayerTasks::ChooseTask::ChooseTask ( std::vector< std::size_t >  choices)
explicit

Construct task with given choices.

Parameters
choicesA container of card to choose.

Member Function Documentation

◆ GetTaskID()

TaskID RosettaStone::PlayerTasks::ChooseTask::GetTaskID ( ) const
overridevirtual

Returns task ID.

Returns
Task ID.

Implements RosettaStone::ITask.

◆ Mulligan()

static ChooseTask RosettaStone::PlayerTasks::ChooseTask::Mulligan ( Player player,
std::vector< std::size_t >  choices 
)
static

ChooseTask wrapper for mulligan.

Parameters
playerThe player to run task.
choicesA container of card to choose.
Returns
Generated PlayCardTask for intended purpose.

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