private int Next() { int ch = unreadBuffer.Remove(); offset++; column++; if (ch == '\n') { column = 1; line++; } else if (ch == '\r') { Require(1); if (Peek() == '\n') { // delay processing linebreak } else { column = 1; line++; } } return(ch); }
private void RemoveFromQueue(BattleCharacter character) { if (turnQueue.Contains(character)) { turnQueue.Remove(character); } }
/// <summary> /// Remove an element from the Queue /// </summary> /// <param name="item">Element to be removed</param> /// <returns>Whether the element was removed or not</returns> public bool Remove(T item) { Contract.Assert(IsReadOnly == false, "The Circular queue is read only"); if (!QueueList.Contains(item)) { return(false); } QueueList.Remove(item); return(true); }
public Token Pop() { Require(2); return(lookAhead.Remove()); }