Deep RTS
NumUnitTypeCreated.h
Go to the documentation of this file.
1//
2// Created by per on 9/6/21.
3//
4
5#ifndef DEEPRTS_NUMUNITTYPECREATED_H
6#define DEEPRTS_NUMUNITTYPECREATED_H
7
8#include "Constants.h"
9#include "ScenarioCriteria.h"
10
11namespace DeepRTS::Criteria{
13 const Constants::Unit unitType;
14 bool isValid;
15 const int count;
16 public:
17 explicit NumUnitTypeCreated(Constants::Unit unitType, int count, int rewardSuccess=0.01, int rewardFailure=-0.01);
18
19 [[nodiscard]] bool evaluate(const Player& player) override;
20 [[nodiscard]] int reward() const override;
21 [[nodiscard]] std::shared_ptr<ScenarioCriteria> clone() const override{
22 return std::shared_ptr<ScenarioCriteria>(new NumUnitTypeCreated(*this));
23 }
24
25 };
26
27}
28
29
30
31#endif //DEEPRTS_NUMUNITTYPECREATED_H
Definition: NumUnitTypeCreated.h:12
bool evaluate(const Player &player) override
Definition: NumUnitTypeCreated.cpp:8
std::shared_ptr< ScenarioCriteria > clone() const override
Definition: NumUnitTypeCreated.h:21
NumUnitTypeCreated(Constants::Unit unitType, int count, int rewardSuccess=0.01, int rewardFailure=-0.01)
Definition: NumUnitTypeCreated.cpp:37
int reward() const override
Definition: NumUnitTypeCreated.cpp:42
Definition: ScenarioCriteria.h:14
const int rewardFailure
Definition: ScenarioCriteria.h:18
const int rewardSuccess
Definition: ScenarioCriteria.h:17
Definition: Player.h:18
Unit
Definition: Constants.h:20
Definition: DamageDone.h:10