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