public TestBotMainController(TestBotControllerFactory testBotControllerFactory, UserFightQueue userFightQueue, string login) { _testBotControllerFactory = testBotControllerFactory ?? throw new ArgumentNullException(nameof(testBotControllerFactory)); _userFightQueue = userFightQueue ?? throw new ArgumentNullException(nameof(userFightQueue)); Login = login ?? throw new ArgumentNullException(nameof(login)); }
public IMainController CreateMainController(UserFightQueue userFightQueue) { var m = new TestBotMainController(this, userFightQueue, _login); m.GoToFightQueue();//бот сразу идет в очередь return(m); }
public MainUserController(UserControllerFactory controllersFactory, User user, UserFightQueue userFightQueue) { _controllersFactory = controllersFactory ?? throw new ArgumentNullException(nameof(controllersFactory)); _user = user ?? throw new ArgumentNullException(nameof(user)); _userFightQueue = userFightQueue ?? throw new ArgumentNullException(nameof(userFightQueue)); _user.MsgReaders.RegisterMsgReader <FightQueueMessage>(FightQueueMessage_Reader); _user.Disconnected += User_Disconnected; }
public IMainController CreateMainController(UserFightQueue userFightQueue) { return(new MainUserController(this, _user, userFightQueue)); }
void UserFightQueue_UserEnqueue(UserFightQueue sender, UserFightQueue.Entry entry) { Console.WriteLine(typeof(BotTestServer).Name + $" Login={entry.controllersFactory.Login} FightQueue_UserEnqueue"); _test.Step_AllUsers_EnqueueInFightQueue.IncrimentCounter(entry.controllersFactory.Login); }