public bool CheckPositionFood(Point food) { for (int i = 0; i < pList.Count; i++) { if (food.IsHit(pList[i])) { return(true); } } return(false); }
private bool IsHit(Point point) { foreach (var p in PointList) { if (point.IsHit(p)) { return(true); } } return(false); }
private bool IsHit(Point point) { foreach (var p in PointList) { if (point.IsHit(p)) { return true; } } return false; }
public bool Eat(Point food) { Point head = GetNextPoint(); if (head.IsHit(food)) { food.sym = head.sym; pList.Add(food); return(true); } else { return(false); } }
internal bool Eat(Point food) { Point head = GetNextStep(); if (head.IsHit(food)) { food.sym = head.sym; PointList.Add(food); return(true); } else { return(false); } }
internal bool Eat(Point food) { // Point head = GetNextPoint(); Point head = pList.Last(); if (head.IsHit(food)) { food.sym = head.sym; pList.Add(food); return(true); } else { return(false); } }