private void TurnCompletedHandler(object sender, TurnCompletedEventArgs e)
        {
            var turnCompletedXml = new TurnResultMessage
            {
                Player1Move = e.TurnData.Player1Move.Name,
                Player2Move = e.TurnData.Player2Move.Name,
                Result = e.TurnData.Result,
                GameId = e.GameInfo.GameId
            }.ToXml();

            Connection.Send(new Message(e.GameInfo.Player1, turnCompletedXml));
            Connection.Send(new Message(e.GameInfo.Player2, turnCompletedXml));
        }
        private void TurnCompletedHandler(object sender, TurnCompletedEventArgs e)
        {
            _dispatcher.BeginInvoke(new Action(() =>
            {
                var game = TournamentGames.FirstOrDefault(x => x.GameId == e.GameInfo.GameId);
                if (game == null) return;

                if (e.TurnData.Result == Common.TurnResult.Player1)
                    game.Player1Wins++;
                else if (e.TurnData.Result == Common.TurnResult.Player2)
                    game.Player2Wins++;
                else if (e.TurnData.Result == Common.TurnResult.Tie)
                    game.Ties++;

                game.Turns.Add(new TurnResultViewModel
                {
                    Player1Move = e.TurnData.Player1Move.Name,
                    Player2Move = e.TurnData.Player2Move.Name,
                    Result = e.TurnData.Result.ToString()
                });

            }), new object[] { });
        }