public bool IsEaten(List <Point> snake) { Point head = snake.Last(); if (_map.CheckCollisions(head)) { _map.Score += 10; return(true); } return(false); }
public void Move() { Point tail = _snake.First(); _snake.Remove(tail); Point head = GetNextPoint(); _snake.Add(head); if (_map.CheckCollisions(head)) { IsAlive = false; } _map.Remove(tail); tail.Clear(); _map.Place(head); head.Draw(); }