PlayCardTask.hpp
Go to the documentation of this file.
1 // This code is based on Sabberstone project.
2 // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
3 // Hearthstone++ is hearthstone simulator using C++ with reinforcement learning.
4 // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
5 
6 #ifndef ROSETTASTONE_PLAY_CARD_TASK_HPP
7 #define ROSETTASTONE_PLAY_CARD_TASK_HPP
8 
10 
12 {
19 class PlayCardTask : public ITask
20 {
21  public:
26  PlayCardTask(Entity* source, Entity* target = nullptr, int fieldPos = -1);
27 
32  static PlayCardTask Minion(Player& player, Entity* source);
33 
38  static PlayCardTask Spell(Player& player, Entity* source);
39 
45  static PlayCardTask SpellTarget(Player& player, Entity* source,
46  Entity* target);
47 
52  static PlayCardTask Weapon(Player& player, Entity* source);
53 
56  TaskID GetTaskID() const override;
57 
58  private:
62  TaskStatus Impl(Player& player) override;
63 
64  int m_fieldPos = -1;
65 };
66 } // namespace RosettaStone::PlayerTasks
67 
68 #endif // ROSETTASTONE_PLAY_CARD_TASK_HPP
TaskStatus
Meta data to represent the result of the task.
Definition: TaskStatus.hpp:15
PlayCardTask(Entity *source, Entity *target=nullptr, int fieldPos=-1)
static PlayCardTask Weapon(Player &player, Entity *source)
static PlayCardTask SpellTarget(Player &player, Entity *source, Entity *target)
PlayCardTask class.
Definition: PlayCardTask.hpp:19
Definition: AttackTask.hpp:11
Abstract entity structure that stores card data.
Definition: Entity.hpp:28
static PlayCardTask Minion(Player &player, Entity *source)
static PlayCardTask Spell(Player &player, Entity *source)
Player class.
Definition: Player.hpp:33
ITask class.
Definition: Tasks.hpp:22