示例#1
0
        /// <summary>
        /// Checks if the game can start, in which case notifies
        /// the game controller.
        /// </summary>
        protected virtual void OnGameCanStart()
        {
            if (this.GameCanStart != null)
            {
                IList<string> playerIds = this.Players.Select(player => player.Id).ToList();
                var args = new TableCanStartEventArgs(playerIds);

                this.GameCanStart(this, args);
            }
        }
示例#2
0
 private void OnGameCanStart(object sender, TableCanStartEventArgs tableCanStartEventArgs)
 {
     this.OnGameCanStartWasInvoked = true;
 }
示例#3
0
 /// <summary>
 /// Notifies the given players that the game can start
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="tableCanStartEventArgs"></param>
 private void GameCanStart(object sender, TableCanStartEventArgs tableCanStartEventArgs)
 {
     // notify all the players
     tableCanStartEventArgs.PlayersToBeNotified
         .ToList()
         .ForEach(x => this._notifier.NotifyClientThatGameCanStart(x));
 }