Example #1
0
        private void OnBallPlayed(BallDTO ball)
        {
            if (this.PlayedBalls.Any(b => b.Name == ball.Name))
            {
                return;
            }

            this.PlayedBalls.Insert(0, ball);

            if (this.PlayerModel != null)
            {
                this.PlayerModel.AdjustBoardsState(ball);
            }

            this._triggerUIRefresh?.Invoke();
        }
Example #2
0
        public async Task SendBallPlayedMessage(string inGameName, BallDTO ballPlayed)
        {
            if (Clients == null)
            {
                return;
            }

            var gropuFound = Clients.Group(inGameName);

            if (gropuFound == null)
            {
                return;
            }

            await gropuFound.SendAsync("OnBallPlayedMessage", ballPlayed);
        }