public void ThrowSelectedFormationAction(CircularlyLinkedNode <IPlayer> player, IFormation formation) { if (_currentRound != null) { if (formation.Signature != _currentRound.Formation.Signature || formation.Cards.Length != _currentRound.Formation.Cards.Length || formation.Weight < _currentRound.Formation.Weight) { MessageBox.Show("violate rules"); return; } } this.pnlDesk.CardBoxes = formation.Cards.Select(p => new CardBox() { CardCode = p.Code, ImageLocation = GetImgLocation(p.Code) }).ToList(); _playerControls[player].TakeOutButton.Enabled = false; _playerControls[player].PassButton.Enabled = false; //_playerControls[player].CardBoxContainer.RemoveSelectedCardBoxes(); _playerControls[player].CardBoxContainer.RemoveCardBoxes(c => formation.Cards.Any(p => p.Code == c.CardCode)); EndCountDown(player); OnUserTakeoutFormation(player, formation); }
private void EndCountDown(CircularlyLinkedNode <IPlayer> player) { _timer.Stop(); }
public void DiscardLandlordsAction(CircularlyLinkedNode <IPlayer> player) { _playerControls[player].ShoutButton.Enabled = false; _playerControls[player].SilenceButton.Enabled = false; EndCountDown(player); }
public void ActLandlordsAction(CircularlyLinkedNode <IPlayer> player) { EndCountDown(player); OnPlayerDesireLandlords(player); }
public void ArrangeActLandlordsActionPrelude(CircularlyLinkedNode <IPlayer> player) { _playerControls[player].ShoutButton.Enabled = true; _playerControls[player].SilenceButton.Enabled = true; StartCountDown(player, p => OnPlayerActLandlordsTimeout(p)); }