blob: cb8c5ef2964a2e219a191967ce520bc5f07887ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#include "ant.hh"
/*
* Class representing the generic Worker Caste
*/
class Worker : public Ant
{
public:
//! inherit Ant constructors
using Ant::Ant;
//! constructor
Worker(std::shared_ptr<Colony> colony, float luck,
DevelopmentStage stage = DevelopmentStage::EGG);
//! the Worker will do all of its tasks
virtual void work();
//! getter for food_stock_
float get_food_stock() const;
//! add given value to food_stock_
void increment_food_stock_by(float value);
//! return the luck of the worker
float get_luck() const;
protected:
//! current food that the worker store on her.
float food_stock_ = 0.0;
//! luck of the worker
float luck_ = 3.141592;
};
|