Ejemplo n.º 1
0
void CGameCounter::Spawn(void)
{
	// Save off the initial count
	SetInitialValue(CountValue());
	CRulePointEntity::Spawn();
}
Ejemplo n.º 2
0
	/** Debugging function, counts number of occurrences of an element regardless of its correct position in the tree */
	size_t CountValue(const T &element, size_t node_idx) const
	{
		if (node_idx == INVALID_NODE) return 0;
		const node &n = this->nodes[node_idx];
		return CountValue(element, n.left) + CountValue(element, n.right) + ((n.element == element) ? 1 : 0);
	}
Ejemplo n.º 3
0
	inline BOOL HitLimit(void) { return CountValue() == LimitValue(); }