예제 #1
0
        public void Start()
        {
            ConsoleKeyInfo   input;
            List <Direction> directions = new List <Direction>();

            while (true)
            {
                if (Foods.Count < FoodCount)
                {
                    GenerateFood(FoodCount);
                }

                if (IsBotEnabled)
                {
                    BotEngine botEngine = new BotEngine(Speed);
                    botEngine.Run(this);
                }
                else
                {
                    input = Reader.ReadLine(Speed);
                    MoveSnake(input.Key);
                }
            }
        }