public ScenarioRunner ReceivesGameJoinedEvent() { var gameEvent = new GameJoinedEvent(this.GetPlayerId(this.currentPlayerAgent.Name)); var eventInstruction = new EventInstruction(gameEvent); this.currentPlayerAgent.AddInstruction(eventInstruction); return(this); }
public async Task Handle(GameJoinedEvent notification, CancellationToken cancellationToken) { await _hubContext.Groups.AddToGroupAsync(notification.Player.Identifier, notification.Lobby.LobbyId.ToString()); }