namespace SpriteCompiler.AI.Queue { using System.Collections.Generic; public class LIFO : IQueue { private readonly Stack stack = new Stack(); public void Clear() { stack.Clear(); } public bool Empty { get { return stack.Count == 0; } } public T Remove() { return stack.Pop(); } public void Enqueue(T item) { stack.Push(item); } public void AddRange(IEnumerable items) { foreach (var item in items) { stack.Push(item); } } } }