Version 1
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Field.hpp"
|
||||
|
||||
class Agent
|
||||
{
|
||||
public:
|
||||
Agent(float fl_x, float fl_y, float fl_w, float fl_h, float direction, float fl_pheromone_strength, float fl_random_influence, float fl_lookahead_distance);
|
||||
~Agent();
|
||||
|
||||
void tick(Field* field);
|
||||
|
||||
private:
|
||||
float fl_x, fl_y, fl_w, fl_h, fl_direction, fl_pheromone_strength, fl_random_influence, fl_lookahead_distance;
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <math.h>
|
||||
|
||||
class Field
|
||||
{
|
||||
public:
|
||||
Field(int i_width, int i_height, float fl_pheromone_max);
|
||||
~Field();
|
||||
|
||||
void tick();
|
||||
|
||||
void add_pheromone(float fl_x, float fl_y, float fl_strength);
|
||||
|
||||
float get_pheromone_strength(float fl_x, float fl_y);
|
||||
float get_pheromone_strength(int i_x, int i_y);
|
||||
|
||||
float get_pheromone_max();
|
||||
|
||||
private:
|
||||
int i_width, i_height;
|
||||
|
||||
float** fl_ground;
|
||||
|
||||
float fl_pheromone_max;
|
||||
};
|
||||
Reference in New Issue
Block a user