예제 #1
0
 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);
 }
예제 #2
0
 private void EndCountDown(CircularlyLinkedNode <IPlayer> player)
 {
     _timer.Stop();
 }
예제 #3
0
 public void DiscardLandlordsAction(CircularlyLinkedNode <IPlayer> player)
 {
     _playerControls[player].ShoutButton.Enabled   = false;
     _playerControls[player].SilenceButton.Enabled = false;
     EndCountDown(player);
 }
예제 #4
0
 public void ActLandlordsAction(CircularlyLinkedNode <IPlayer> player)
 {
     EndCountDown(player);
     OnPlayerDesireLandlords(player);
 }
예제 #5
0
 public void ArrangeActLandlordsActionPrelude(CircularlyLinkedNode <IPlayer> player)
 {
     _playerControls[player].ShoutButton.Enabled   = true;
     _playerControls[player].SilenceButton.Enabled = true;
     StartCountDown(player, p => OnPlayerActLandlordsTimeout(p));
 }