MCPcopy Create free account
hub / github.com/chrxh/alien / getCellFunctionType

Method getCellFunctionType

source/EngineInterface/Descriptions.cpp:19–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19CellFunction CellDescription::getCellFunctionType() const
20{
21 if (!cellFunction) {
22 return CellFunction_None;
23 }
24 if (std::holds_alternative<NeuronDescription>(*cellFunction)) {
25 return CellFunction_Neuron;
26 }
27 if (std::holds_alternative<TransmitterDescription>(*cellFunction)) {
28 return CellFunction_Transmitter;
29 }
30 if (std::holds_alternative<ConstructorDescription>(*cellFunction)) {
31 return CellFunction_Constructor;
32 }
33 if (std::holds_alternative<SensorDescription>(*cellFunction)) {
34 return CellFunction_Sensor;
35 }
36 if (std::holds_alternative<NerveDescription>(*cellFunction)) {
37 return CellFunction_Nerve;
38 }
39 if (std::holds_alternative<AttackerDescription>(*cellFunction)) {
40 return CellFunction_Attacker;
41 }
42 if (std::holds_alternative<InjectorDescription>(*cellFunction)) {
43 return CellFunction_Injector;
44 }
45 if (std::holds_alternative<MuscleDescription>(*cellFunction)) {
46 return CellFunction_Muscle;
47 }
48 if (std::holds_alternative<DefenderDescription>(*cellFunction)) {
49 return CellFunction_Defender;
50 }
51 if (std::holds_alternative<ReconnectorDescription>(*cellFunction)) {
52 return CellFunction_Reconnector;
53 }
54 if (std::holds_alternative<DetonatorDescription>(*cellFunction)) {
55 return CellFunction_Detonator;
56 }
57 return CellFunction_None;
58}
59
60bool CellDescription::hasGenome() const
61{

Callers 15

compareInsertMutationMethod · 0.45
compareDeleteMutationMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls

no outgoing calls

Tested by 15

compareInsertMutationMethod · 0.36
compareDeleteMutationMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
processCellMethod · 0.36