public void BigMoney_vs_SimpleAI() { var multiGameHost = new MultiGameHost(); var key = multiGameHost.CreateNewGame(new[] { "SimpleAI", "SimpleAI", "BigMoneyAI", "BigMoneyAI" }, 4); var gameData = multiGameHost.GetGameData(key); var player1Id = gameData.Slots.Keys.First(); var player1Client = multiGameHost.FindClient(player1Id); while (!player1Client.GetGameState().Status.GameIsComplete) Thread.Sleep(500); Debug.Write(player1Client.GetGameState().Log); }
public static void Initialize() { var builder = new ContainerBuilder(); builder.RegisterControllers(Assembly.GetExecutingAssembly()); var host = new MultiGameHost(); builder.RegisterInstance(host) .As<MultiGameHost>(); _container = builder.Build(); var factory = new MvcDynamicSessionControllerFactory(new AutofacControllerFactory(new ContainerProvider(_container))); ControllerBuilder.Current.SetControllerFactory(factory); }
public HomeController(MultiGameHost host) { _host = host; }