public bool TouchBounds(ushort min_xbound, ushort max_xbound, ushort min_ybound, ushort max_ybound) { Point head = plist.Last(); if (head.CheckHit(new Point(min_xbound, min_ybound), "xory") || head.CheckHit(new Point(max_xbound, max_ybound), "xory")) { return(true); } else { return(false); } }
public bool TouchSelf() { Point head = plist.Last(); for (ushort n = 0; n < plist.Count - 4; n++) { if (head.CheckHit((plist[n]), "xy")) { return(true); } } return(false); }
internal bool Eat(Food food) { Point head = GenNextPoint(); if (head.CheckHit(food, "xy")) { Point nosh = new Point(food); nosh.CopyParameter(head, "s"); plist.Add(nosh); nosh.Draw(color); return(true); } else { return(false); } }