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

Method n_vonn_neumann

MicropolisCore/src/CellEngine/src/cellengine.cpp:1628–1655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1626
1627
1628void CellEngine::n_vonn_neumann()
1629{
1630 if (rule == NULL) return;
1631
1632 // 0 1 2 3 4 5 6 7 8 9
1633 // c c' e' w' s' n' e w s n
1634 // 0x1 0x2 0x4 0x8 0x10 0x20 0x40 0x80 0x100 0x200
1635
1636#define VON_NEUMANN ( \
1637 ((c & 3) << 0) | \
1638 ((e & 1) << 6) | \
1639 ((e & 2) << 1) | \
1640 ((w & 1) << 7) | \
1641 ((w & 2) << 2) | \
1642 ((s & 1) << 8) | \
1643 ((s & 2) << 3) | \
1644 ((n & 1) << 9) | \
1645 ((n & 2) << 4))
1646
1647 if (inflation) {
1648 int last = 0;
1649 int heat = 0;
1650
1651 CAM_MASKED_REG_TABLE_HEAT6_LOOP(VON_NEUMANN)
1652 } else {
1653 CAM_MASKED_REG_TABLE_LOOP(VON_NEUMANN)
1654 }
1655}
1656
1657
1658void CellEngine::n_margolis()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected