public async Task <BotOrder> UpdateBotAsync(Bot bot) { if (!BotValidator.ValidateDefault(bot)) { throw new InvalidOperationException(Resources.BotValidFailString); } return(await _botsRepository.UpdateBotAsync(bot)); }
public void Bind() { GameModel gameModel = new GameModel(); MoveSimulation moveSimulation = new MoveSimulation(); BotValidator botValidator = new BotValidator(); GameFactory gameFactory = new GameFactory(gameModel, new PullMoveStrategy()); _managerGame.Bind(gameModel, moveSimulation, botValidator, gameFactory); }
public async Task CreateNewBotAsync(Bot bot) { if (!BotValidator.ValidateDefault(bot)) { throw new InvalidOperationException(Resources.BotValidFailString); } await _botsRepository.AddBotAsync(bot); }
public void Bind(GameModel gameModel, MoveSimulation moveSimulation, BotValidator botValidator, GameFactory gameFactory) { _gameModel = gameModel; _moveSimulation = moveSimulation; _botValidator = botValidator; _gameFactory = gameFactory; }