コード例 #1
0
        public ScenarioRunner ReceivesGameJoinedEvent()
        {
            var gameEvent        = new GameJoinedEvent(this.GetPlayerId(this.currentPlayerAgent.Name));
            var eventInstruction = new EventInstruction(gameEvent);

            this.currentPlayerAgent.AddInstruction(eventInstruction);
            return(this);
        }
コード例 #2
0
 public async Task Handle(GameJoinedEvent notification, CancellationToken cancellationToken)
 {
     await _hubContext.Groups.AddToGroupAsync(notification.Player.Identifier, notification.Lobby.LobbyId.ToString());
 }