public int StartBattle(IEnumerable <Player> participants) { lock (_lock) { var battleId = _battleRepository.GetNextId(); var battle = new Battle(battleId, _playerActivity, participants); _battleRepository.Save(battle); _eventDispatcher.Dispatch(battle); return(battleId); } }