Exemplo n.º 1
0
        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();
        }