public bool NextAvailable() { if (count == 0) return false; int next = (cursor + 1) % history.Length; if (next == head) return false; return true; }