예제 #1
0
        private bool EatFood(Vector3 snakeHead)
        {
            LinkedList <Vector2> list = food.GetVector2List();

            if (list.Contains(new Vector2(snakeHead.X, snakeHead.Y)))
            {
                food.RemoveItem(snakeHead);
                player.AddPoint(POINT);
                CreateFood();
                return(true);
            }
            return(false);
        }