-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcritter.h
47 lines (38 loc) · 1.29 KB
/
critter.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* @file
* Header: Critter
*
* All REvoSim code is released under the GNU General Public License.
* See LICENSE.md files in the programme directory.
*
* All REvoSim code is Copyright 2018 by Mark Sutton, Russell Garwood,
* and Alan R.T. Spencer.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or (at
* your option) any later version. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY.
*/
#ifndef CRITTER_H
#define CRITTER_H
#include <QtGlobal>
class Critter
{
public:
Critter();
void initialise(quint64 gen, quint8 *env, int x, int y, int z, quint64 species);
int recalc_fitness(quint8 *env);
int breed_with_parallel(int xpos, int ypos, Critter *partner, int *newgenomecount_local);
bool iterate_parallel(int *KillCount_local, int addfood);
int return_recomb();
int xpos, ypos, zpos;
quint64 genome;
quint32 ugenecombo;
int age; //start off positive - 0 is dead - reduces each time
int fitness;
int energy; //breeding energy
int variableBreedAsex;//Track breeding
quint64 speciesid; //this is inherited from parents
};
#endif // CRITTER_H