MCPcopy Create free account
hub / github.com/SimHacker/micropolis / SetRuleTable

Method SetRuleTable

MicropolisCore/src/CellEngine/src/cellengine.cpp:913–929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911
912
913void CellEngine::SetRuleTable(
914 const char *table,
915 int ruleSize,
916 int neigh)
917{
918 neighborhood = neigh;
919 if (rule != NULL) {
920 delete [] rule;
921 rule = NULL;
922 } // if
923
924 if (ruleSize != 0) {
925 rule = new unsigned char[ruleSize];
926 memcpy(rule, table, ruleSize);
927 ruleStatic = 0;
928 } // if
929}
930
931
932int CellEngine::CountRules()

Callers 1

SetRuleBufferMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected