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(); }
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); }