public Point GetNextPoint() { Point head = ListP.Last(); Point NextPoint = new Point(head); NextPoint.Move(1, direction); return(NextPoint); }
internal void Move() { Point tail = ListP.First(); ListP.Remove(tail); Point head = GetNextPoint(); ListP.Add(head); tail.Clear(); head.Draw(); }
internal bool IsHitTail() { Point head = ListP.Last(); for (int i = 0; i < ListP.Count - 2; i++) { if (head.IsHit(ListP[i])) { return(true); } } return(false); }
internal bool Eat(Point food) { Point head = GetNextPoint(); if (head.IsHit(food)) { food.sym = head.sym; ListP.Add(food); return(true); } else { return(false); } }
public Vector GetLastP() { return(ListP.Last()); }