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

Function MARG_RULE_GAS

MicropolisCore/src/CellEngine/src/cellengine.cpp:4899–4925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4897
4898
4899unsigned char MARG_RULE_GAS(
4900 unsigned char c,
4901 unsigned char cw,
4902 unsigned char ccw,
4903 unsigned char opp,
4904 unsigned char r,
4905 unsigned char p)
4906{
4907 unsigned char result = 0;
4908 unsigned char collision =
4909 ((c & 1) == (opp & 1)) &&
4910 ((cw & 1) == (ccw & 1)) &&
4911 ((c & 1) != (cw & 1));
4912 unsigned char frozen =
4913 (c | cw | ccw | opp) & 2;
4914 if (frozen) {
4915 if (c & 3) {
4916 result = 2;
4917 } // if
4918 } else if (collision) {
4919 result = cw;
4920 } else {
4921 result = opp;
4922 } // if
4923
4924 return result;
4925}
4926
4927
4928void CellEngine::n_dendrite()

Callers 1

n_dendriteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected