added new sanity checks and compile-time assertions to prevent errors
fixed stair-building issue new test-cases added elevator support fixed/improved some walker modules
This commit is contained in:
@@ -108,9 +108,9 @@ public:
|
||||
void connectUniDir(T& n1, const T& n2) {
|
||||
Assert::isFalse(n1.hasNeighbor(n2._idx), "this neighbor is already connected"); // already connected?
|
||||
Assert::notEqual(n1.getIdx(), n2.getIdx(), "can not connect node with itself");
|
||||
Assert::isFalse(n1.fullyConnected(), "this node has already reached its neighbor-limit");
|
||||
n1._neighbors[n1._numNeighbors] = n2._idx;
|
||||
++n1._numNeighbors;
|
||||
Assert::isBetween(n1._numNeighbors, (uint8_t) 0, (uint8_t) 10, "number of neighbors out of bounds!");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user