public static bool Add(LinkedList<object> coll, object obj) { if (obj == null) { return false; } return coll.AddLast(obj) != null; }
public void AddObject(Actor actor) { Type cls = actor.GetType(); if (CollectionUtils.Contains(cls,this.collisionClasses)) { this.collisionChecker.AddObject(actor); } else { LinkedList classSet = (LinkedList) this.freeObjects.Get(cls); if (classSet == null) { classSet = new LinkedList(); this.freeObjects.Put(cls, classSet); } CollectionUtils.Add(classSet,actor); } }
public static bool AddAll(ICollection source, LinkedList dest) { return dest.AddAll(source); }
public static object RemoveAt(LinkedList coll, int index) { object obj2 = coll[index]; coll.RemoveAt(index); return obj2; }
public static object Poll(LinkedList coll) { return coll.RemoveFirst(); }
private bool Ydirect(Grid start, Grid end, LinkedList path) { if (start.GetXpos() != end.GetXpos()) { return false; } int direct = 1; if (start.GetYpos() > end.GetYpos()) { direct = -1; } path.Clear(); for (int y = start.GetYpos() + direct; y != end.GetYpos() && y < yBound && y >= 0; y += direct) { if (grid[y][start.GetXpos()].IsVisible()) { return false; } path.Add(grid[y][start.GetXpos()]); } path.Add(end); return true; }
private void DeletePair(Grid prev, Grid current) { LinkedList temp = new LinkedList(); temp.Add(prev); for (int i = 0; i < pcount; i++) { temp.AddAll(path[i]); path[i].Clear(); } AnimateThread thread = new AnimateThread(temp); thread.Tag = this; thread.Start(); }
private bool Xdirect(Grid start, Grid end, LinkedList path) { if (start.GetYpos() != end.GetYpos()) return false; int direct = 1; if (start.GetXpos() > end.GetXpos()) { direct = -1; } path.Clear(); for (int x = start.GetXpos() + direct; x != end.GetXpos() && x < xBound && x >= 0; x += direct) { if (grid[start.GetYpos()][x].IsVisible()) { return false; } path.Add(grid[start.GetYpos()][x]); } path.Add(end); return true; }
private void Reset() { overFlag = false; failgame = false; if (path == null) { path = new LinkedList[3]; } path[0] = new LinkedList(); path[1] = new LinkedList(); path[2] = new LinkedList(); init = false; count = 0; if (progress != null) { progress.Set(progress_number); } InitUI(); }
public AnimateThread(LinkedList temp) { v = temp; }
public LinkedList() { this.list = new LinkedList<object>(); }
public TaskQueue() { this.queue = new LinkedList(); }