| 911 | |
| 912 | |
| 913 | void 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 | |
| 932 | int CellEngine::CountRules() |