public void Run() { Mediator mediator = InstantiateMediator(); Console.WriteLine("Facade works"); Thread.Sleep(1000); Console.ReadKey(); IPlayerRepository playerRepoProxy = new PlayerRepoProxy(new PlayerRepository()); _controller = new HomeController(ViewsFactory.Create("HomeController"), this, playerRepoProxy, mediator); _showProfilesCommand = new ShowPlayerProfilesCommand((IHomeController)_controller); _showProfilesCommand.Execute(); while (true) { Render(); HandleInput(); Thread.Sleep(16); } }
public IController ChangeController(string command, IBoardStrategy strategy = null) { return(command.Equals(Contracts.Contracts.GameController) ? new GameController(ViewsFactory.Create(command), WindowFacade, strategy) : this); }