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