// Engine constructor public Engine(IRenderer renderer, IHungryCreature creature, List <IEatable> eatables, ICollisionHandler collisionHandler, IUsersManager usersManager, IUserController controller) { this.userName = usersManager.RequestUserName(renderer); this.foodAmount = eatables.Capacity; this.renderer = renderer; this.controller = controller; this.eatables = eatables; this.creature = creature; this.collisionHandler = collisionHandler; // Clear the console so the username won't be stuck on the scores screen renderer.ClearConsole(); for (int counter = 0; counter < foodAmount; counter++) { this.AddFood(); } }
// Engine constructor public Engine(IRenderer renderer, IHungryCreature creature, List<IEatable> eatables, ICollisionHandler collisionHandler, IUsersManager usersManager, IUserController controller) { this.userName = usersManager.RequestUserName(renderer); this.foodAmount = eatables.Capacity; this.renderer = renderer; this.controller = controller; this.eatables = eatables; this.creature = creature; this.collisionHandler = collisionHandler; // Clear the console so the username won't be stuck on the scores screen renderer.ClearConsole(); for (int counter = 0; counter < foodAmount; counter++) { this.AddFood(); } }