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); }
/// <summary> /// Check if the queue contains the element /// </summary> /// <param name="item">Element to be checked</param> /// <returns>Whether the searched element was found</returns> public bool Contains(T item) { return(QueueList.Contains(item)); }