Add DNA to tree
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
#ifndef DNA_H
|
||||
#define DNA_H
|
||||
|
||||
#include <cinttypes>
|
||||
#include <array>
|
||||
|
||||
#include <raylib.h>
|
||||
|
||||
#define MAX_DEPTH 11
|
||||
|
||||
struct uint128
|
||||
{
|
||||
@@ -15,6 +23,13 @@ struct Moon
|
||||
float size;
|
||||
};
|
||||
|
||||
struct Branch
|
||||
{
|
||||
Color color;
|
||||
uint8_t numOfBranches;
|
||||
float lenghthRatio;
|
||||
};
|
||||
|
||||
struct Dna
|
||||
{
|
||||
Moon moon;
|
||||
@@ -22,6 +37,9 @@ struct Dna
|
||||
int time;
|
||||
uint128 mountenSeed;
|
||||
uint128 starSeed;
|
||||
std::array<Branch, MAX_DEPTH> branches;
|
||||
};
|
||||
|
||||
Dna newDna();
|
||||
void newDna(Dna &dna);
|
||||
|
||||
#endif /* DNA_H */
|
||||
|
Reference in New Issue
Block a user