예제 #1
0
        public void LifeCycle(Field field)
        {
            bool keyAvailabe = false;

            while (!keyAvailabe)
            {
                var searchList = _genericAnimal.CopyList(field);
                _genericAnimal.LocateEnemy(field, searchList);
                _genericAnimal.LocateFriend(field, searchList);
                _herbivore.ChooseTheMove(searchList, field);
                _carnivore.ChooseTheMove(searchList, field);
                _facade.SetCursorPosition();
                _display.DrawAnimals(field);
                _facade.Sleep();
                keyAvailabe = _facade.KeyAvailable();
            }
        }