Nano v1.0.0
Simulating Natural Selection
simulation_data.h
Go to the documentation of this file.
1#pragma once
2// clang-format off
3#include "pch_types.h"
4// clang-format on
5
6namespace ss::types
7{
8enum class EntityTarget
9{
13 IDLE
14};
15
16struct fVec2
17{
18 float x;
19 float y;
20
21 auto operator<=>(const fVec2 &) const = default;
22};
23
25struct Trait
26{
27 float sense;
28 float speed;
29
30 auto operator<=>(const Trait &) const = default;
31};
32
35{
36 size_t worldSize;
38 size_t foodCount;
40 Trait initialTraits = {1.0f, 1.0f};
41 int foodChange = 0;
42};
43
45struct Cycle
46{
48 std::vector<Trait> traitsInfo; // traitsInfo.size() == lastedEntities
49
50 auto operator<=>(const Cycle &) const = default;
51};
52} // namespace ss::types
Definition: statistics_store.h:28
EntityTarget
Definition: simulation_data.h:9
A struct holding the data for a cycle.
Definition: simulation_data.h:46
int lastedEntities
Definition: simulation_data.h:47
auto operator<=>(const Cycle &) const =default
std::vector< Trait > traitsInfo
Definition: simulation_data.h:48
A struct holding the data for a simulation.
Definition: simulation_data.h:35
Trait initialTraits
Definition: simulation_data.h:40
size_t foodCount
Definition: simulation_data.h:38
int foodChange
Definition: simulation_data.h:41
size_t startingEntityCount
Definition: simulation_data.h:39
size_t cyclesCount
Definition: simulation_data.h:37
size_t worldSize
Definition: simulation_data.h:36
A struct holding the data for a trait.
Definition: simulation_data.h:26
auto operator<=>(const Trait &) const =default
float sense
Definition: simulation_data.h:27
float speed
Definition: simulation_data.h:28
Definition: simulation_data.h:17
float x
Definition: simulation_data.h:18
auto operator<=>(const fVec2 &) const =default
float y
Definition: simulation_data.h:19