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