コード例 #1
0
        /// <summary>
        /// Moves a card to a position that is either before or after another card within the set.
        /// </summary>
        /// <param name="moving">The card that is moving.</param>
        /// <param name="location">The card that marks the position where the moving card will go.</param>
        /// <param name="before">True if moving to a position before the location. False if after.</param>
        virtual public void SwitchCardOrder(ICardModel moving, ICardModel location, bool before = true)
        {
            ValidateCards();
            if (moving == null || location == null)
            {
                return;
            }

            _Cards.Remove(moving as Card);
            for (int index = 0; index < _Cards.Count; index++)
            {
                if (_Cards[index] == location)
                {
                    if (before)
                    {
                        _Cards.Insert(index, moving as Card);
                    }
                    else
                    {
                        _Cards.Insert(index + 1, moving as Card);
                    }
                    return;
                }
            }

            return;
        }
コード例 #2
0
ファイル: PlacePiece.cs プロジェクト: dharry1968/CardChess
 public PlacePiece(IPlayerModel player, ICardModel card, Coord coord)
     : base(player, EActionType.PlacePiece)
 {
     Assert.IsNotNull(card);
     Card  = card;
     Coord = coord;
 }
コード例 #3
0
ファイル: Deck.cs プロジェクト: jamClark/Card-Tricks
        override public void RegisterCard(ICardModel card)
        {
            if (card == null)
            {
                return;
            }
            ValidateCards();
            if (Multiples == null)
            {
                Multiples = new List <int>();
            }
            int index = _Cards.IndexOf(card as Card);

            if (index < 0)
            {
                //registering a new card for the first time
                card.RegisterWithDeck(this);
                _Cards.Add(card as Card);
                Multiples.Add(1);
            }
            else
            {
                Multiples[index]++;
            }
        }
コード例 #4
0
        private void OnSelectCardClick(object sender, RoutedEventArgs e)
        {
            if (Frame.Navigate(typeof(CardView), new CardViewParams {
                CustomerKey = order.CustomerKey, CardId = cardId
            }))
            {
                SetPreviousSettings();
                cardIsLoaded = true;
                var cardView = (CardView)Frame.Content;
                if (cardView == null)
                {
                    return;
                }

                cardView.Selected += card =>
                {
                    Frame.GoBack();
                    cardIsLoaded = true;
                    if (card != null)
                    {
                        CardModel = new SavedCardModel(card.Pan, "**/**");
                        cardId    = card.CardId;
                    }
                    else
                    {
                        CardModel = new DefaultCardModel();
                        cardId    = null;
                    }
                };
                cardView.Cancelled += () => { Frame.GoBack(); };
            }
        }
コード例 #5
0
        private async void PaymentView_OnLoading(FrameworkElement sender, object args)
        {
            if (cardIsLoaded)
            {
                cardIsLoaded = false;
            }
            else
            {
                try
                {
                    var cardManager = new CardManager();
                    var cards       = await cardManager.GetAllCards(order.CustomerKey);

                    if (cards.Count() != 0)
                    {
                        var card = (order.CardId != null
                            ? await cardManager.GetCardById(order.CustomerKey, order.CardId)
                            : null) ?? cards.First();

                        cardId    = card.CardId;
                        CardModel = new SavedCardModel(card.Pan, "**/**");
                    }
                }
                catch
                {
                }
            }
            CardControl.Focus(FocusState.Programmatic);
        }
コード例 #6
0
ファイル: Deck.cs プロジェクト: zachary2234/gamebuilder
 public ICardAssignmentModel OnAssignCard(ICardModel card, int index = -1)
 {
     Debug.Assert(card != null, "Given card was null");
     Debug.Assert(this.actorBehaviorsEditor != null, "Null actorBehaviorsEditor?");
     using (this.actorBehaviorsEditor.StartUndo($"Add {this.GetCardCategory()} card {card.GetTitle()}"))
     {
         UnassignedBehavior behaviorEditor = ((UnassignedCard)card).GetUnassignedBehaviorItem();
         AssignedBehavior   assigned       = this.actorBehaviorsEditor.AddBehavior(behaviorEditor);
         List <string>      deckUseIds     = new List <string>((string[])deckEditor.data);
         if (index >= 0)
         {
             if (index > deckUseIds.Count)
             {
                 throw new System.Exception("OnAssignCard: Index greater than deckUseIds count!");
             }
             deckUseIds.Insert(index, assigned.useId);
         }
         else
         {
             deckUseIds.Add(assigned.useId);
         }
         deckEditor.SetData(deckUseIds.ToArray());
         return(new CardAssignment(assigned, this));
     }
 }
コード例 #7
0
    public Card ReplaceCard(ICardModel unassignedCard, CardContainer container)
    {
        int index = model.GetIndexOf(container.GetCard().GetCardAssignment());

        cardManager.UnassignCard(container.GetCard().GetCardAssignment());
        return(AcceptCard(unassignedCard, index));
    }
コード例 #8
0
 private void Validate(ICardModel selectedCard)
 {
     if (selectedCard != null && !Candidates.Contains(selectedCard))
     {
         throw new InteractionValidationFailException("Selection is not candidate.");
     }
 }
コード例 #9
0
ファイル: PlayerModelBase.cs プロジェクト: facybenbook/Chess2
 public Response CardDrawn(ICardModel card)
 {
     if (Hand.NumCards.Value == Hand.MaxCards)
     {
         return(Response.Fail);
     }
     return(Hand.Add(card) ? Response.Ok : Response.Fail);
 }
コード例 #10
0
 public ICardAssignmentModel OnAssignCard(ICardModel card, int index = -1)
 {
     using (this.actorEditor.StartUndo($"Add Custom card {card.GetTitle()}"))
     {
         var assigned = actorEditor.AddBehavior(((UnassignedCard)card).GetUnassignedBehaviorItem());
         return(new CardAssignment(assigned, this));
     }
 }
コード例 #11
0
 virtual public int GetMultiples(ICardModel card)
 {
     ValidateCards();
     if (_Cards.Contains(card))
     {
         return(1);
     }
     return(0);
 }
コード例 #12
0
ファイル: PieceModel.cs プロジェクト: dharry1968/CardChess
 public PieceModel(IOwner player, ICardModel card)
     : base(player)
 {
     Card = card;
     Dead.Subscribe(dead => { if (dead)
                              {
                                  Died();
                              }
                    });                            // TODO ADDTO .AddTo();
 }
コード例 #13
0
ファイル: PieceModel.cs プロジェクト: facybenbook/Chess2
 public PieceModel(IPlayerModel player, ICardModel card)
     : base(player)
 {
     Card = card;
     Dead.Subscribe(dead => { if (dead)
                              {
                                  Died();
                              }
                    }).AddTo(this);
 }
コード例 #14
0
    public Card AcceptAssignedCard(ICardAssignmentModel assignedCard, int index = -1)
    {
        Debug.Assert(assignedCard != null, "AcceptAssignedCard called with null assignment");
        ICardModel unassignedCard = assignedCard.GetCard();

        // We need to unassign it. But make sure we keep the property assignments.
        PropEditor[] props = assignedCard.GetProperties();
        cardManager.UnassignCard(assignedCard);
        return(AcceptCard(unassignedCard, index, props));
    }
コード例 #15
0
ファイル: CardInstance.cs プロジェクト: galaxyyao/TouhouGrave
 internal void Reset(ICardModel newModel)
 {
     Behaviors.RemoveAll();
     if (newModel != null)
     {
         Model = newModel;
     }
     InstantiateBehaviors();
     m_counters.Clear();
 }
コード例 #16
0
        public string CardToRep(ICardModel model)
        {
            if (model == null)
            {
                return("  ");
            }
            var ch = $"{model.PieceType.ToString()[0]} ";

            return(ch);
        }
コード例 #17
0
    public Card AcceptCard(ICardModel unassignedCard, int index = -1, PropEditor[] initProps = null)
    {
        var assigned = this.model.OnAssignCard(unassignedCard, index);

        if (initProps != null)
        {
            assigned.SetProperties(initProps);
        }
        return(AddCardFromModel(assigned));
    }
コード例 #18
0
        private void CardDropAction(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(typeof(ITreeViewItem).Name))
            {
                TreeViewItem  targetItem = sender as TreeViewItem;
                ITreeViewItem target     = targetItem.DataContext as ITreeViewItem;
                ITreeViewItem card       = e.Data.GetData(typeof(ITreeViewItem).Name) as ITreeViewItem;

                //did we drop onto a card or a deck
                ICardModel dropTarget = target as ICardModel;

                ICardSetViewItem setModel = TreeHelper.InferSet(targetItem);
                if (setModel != null && card != null)
                {
                    ICardSetModel set = setModel as ICardSetModel;
                    if (setModel == card.Parent)
                    {
                        //moving within the same set
                        //did we drop on a deck or a card
                        if (dropTarget != null)
                        {
                            if (dropTarget != card as ICardModel)
                            {
                                set.SwitchCardOrder(card as ICardModel, dropTarget, true);
                            }
                        }
                    }
                    else
                    {
                        //moving to a new set - first, move to the set
                        ICardSetModel owner = card.Parent as ICardSetModel;
                        owner.UnregisterCard(card as ICardModel);
                        owner = set as ICardSetModel;
                        owner.RegisterCard(card as ICardModel);

                        //did we drop on a deck or a card - move card within the set
                        if (dropTarget != null)
                        {
                            if (dropTarget != card as ICardModel)
                            {
                                set.SwitchCardOrder(card as ICardModel, dropTarget, true);
                            }
                        }
                    }

                    NotifyPropertyChanged("ObservableSets");
                }
                else
                {
                    MessageBox.Show("There was an error attempting to determine the card or deck during the drag operation.\n " +
                                    "Hell! I don't even know if it was a card or a deck!");
                    return;
                }
            }
        }
コード例 #19
0
ファイル: Deck.cs プロジェクト: jamClark/Card-Tricks
        /// <summary>
        ///
        /// </summary>
        /// <param name="moving"></param>
        /// <param name="location"></param>
        /// <param name="before"></param>
        override public void SwitchCardOrder(ICardModel moving, ICardModel location, bool before = true)
        {
            ValidateCards();
            if (Multiples == null)
            {
                Multiples = new List <int>();
            }
            if (moving == null || location == null)
            {
                return;
            }
            if (Multiples.Count != _Cards.Count)
            {
                throw new Exception("Invalid state. The number of cards does not match the multiples indexer.");
            }
            //TODO: We need to move the index around for the Multiples!!
            int indexMoving = _Cards.IndexOf(moving as Card);

            if (indexMoving < 0)
            {
                throw new Exception("Invalid state. The moving card's multiples indexer is out of sync.");
            }
            int multiples = Multiples[indexMoving];

            _Cards.Remove(moving as Card);
            int indexLocation = _Cards.IndexOf(location as Card);

            if (indexLocation < 0)
            {
                throw new Exception("Invalid state. The location card's multiples indexer is out of sync.");
            }


            for (int index = 0; index < _Cards.Count; index++)
            {
                if (_Cards[index] == location)
                {
                    if (before)
                    {
                        //place card and multiples just before new location reference point
                        _Cards.Insert(index, moving as Card);
                        Multiples.Insert(index, multiples);
                    }
                    else
                    {
                        //place card and multiples just after new location reference point
                        _Cards.Insert(index + 1, moving as Card);
                        Multiples.Insert(index + 1, multiples);
                    }
                    return;
                }
            }

            return;
        }
コード例 #20
0
 virtual public void RegisterCard(ICardModel card)
 {
     ValidateCards();
     if (!_Cards.Contains(card))
     {
         card.RegisterWithSet(this);
         _Cards.Add(card as Card);
         NotifyPropertyChanged("Cards");
         NotifyPropertyChanged("ObservableCards");
     }
 }
コード例 #21
0
ファイル: Deck.cs プロジェクト: jamClark/Card-Tricks
        override public int GetMultiples(ICardModel card)
        {
            ValidateCards();
            int index = _Cards.IndexOf(card as Card);

            if (index < 0)
            {
                return(0);
            }
            return(Multiples[index]);
        }
コード例 #22
0
 private int GetInitialScore(ICardModel cardModel)
 {
     var manaCost = cardModel.Behaviors.FirstOrDefault(bm => bm is Behaviors.ManaCost.ModelType);
     if (manaCost == null)
     {
         return 0;
     }
     else
     {
         return (manaCost as Behaviors.ManaCost.ModelType).Cost * 10;
     }
 }
コード例 #23
0
        // TODO: save/load score library

        private int GetScore(ICardModel cardModel)
        {
            int score;
            if (m_scoreLibrary.TryGetValue(cardModel.Id, out score))
            {
                return score;
            }

            var initialScore = GetInitialScore(cardModel);
            m_scoreLibrary.Add(cardModel.Id, initialScore);
            return initialScore;
        }
コード例 #24
0
ファイル: BoardView.cs プロジェクト: dharry1968/CardChess
        public void ShowSquares(ICardModel model, ISquareView sq)
        {
            Assert.IsNotNull(sq);
            Assert.IsNotNull(model);

            var board     = Agent.Model;
            var movements = board.GetMovements(sq.Coord, model.PieceType);
            var attacks   = board.GetAttacks(sq.Coord, model.PieceType);

            AddOverlays(movements.Coords, attacks.Coords);
            OverlayView.Add(movements.Interrupts.Select(p => p.Coord.Value), Color.yellow);
            OverlayView.Add(attacks.Interrupts.Select(p => p.Coord.Value), Color.magenta);
        }
コード例 #25
0
        virtual public void UnregisterCard(ICardModel card)
        {
            ValidateCards();
            if (_Cards.Contains(card))
            {
                _Cards.Remove(card as Card);
                card.UnregisterWithSet(this); // this will remove this card from all decks.

                NotifyPropertyChanged("Cards");
                NotifyPropertyChanged("ObservableCards");
                //this card should be deleted at this point so it doesn't
                //need to unregister with any sets
            }
        }
コード例 #26
0
    private void Populate(
        string selectedCardUri, bool isUnsavedNewCard, VoosEngine.BehaviorLogItem?error = null)
    {
        Depopulate();

        this.isUnsavedNewCard = isUnsavedNewCard;
        this.hasCardChanges   = false;

        this.card = new BehaviorCards.UnassignedCard(new UnassignedBehavior(
                                                         selectedCardUri, behaviorSystem));

        CreateCardUI();
        editableCardUi.Populate(this.card);
        codeEditor.Set(this.card.GetUnassignedBehaviorItem(), error);
    }
コード例 #27
0
ファイル: CardInstance.cs プロジェクト: galaxyyao/TouhouGrave
        private CardInstance(ICardModel model, Player owner, bool hasGuid) : this()
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }
            else if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }

            Model = model;
            Owner = owner;
            Guid = hasGuid ? owner.Game.GenerateNextCardGuid() : 0;
            InstantiateBehaviors();
        }
コード例 #28
0
    void Depopulate()
    {
        codeEditor.Clear();

        if (this.card != null)
        {
            if (isUnsavedNewCard)
            {
                // Not saved - discard it for now.
                behaviorSystem.DeleteBehavior(this.card.GetId());
            }
            this.card = null;
        }

        isUnsavedNewCard = false;
        hasCardChanges   = false;
    }
コード例 #29
0
    void Awake()
    {
        addPanelButton.onClick.AddListener(OnAddPanelButtonClick);
        Util.FindIfNotSet(this, ref cursorManager);

        centerButton.onClick.AddListener(panelManager.ZoomOutToAllPanels);
        organizePanelsButton.onClick.AddListener(() => panelManager.SetOrganizedPanels(true));

        cardDetail              = Instantiate(cardDetailPrefab, null);
        cardDetail.onTrashCard += (unassignedModel, assignedModel) =>
        {
            UnassignCard(assignedModel);
        };
        cardDetail.onCodeCard += (card, assignment, container) =>
        {
            if (!card.IsValid())
            {
                return;
            }
            if (card.IsBuiltin())
            {
                // Builtin card. Create a custom copy of it and change the assignment to
                // refer to the copy instead.
                ICardModel cardCustomCopy = card.MakeCopy();
                int        index          = container.deck.GetModel().GetIndexOf(assignment);
                container.deck.AcceptCard(cardCustomCopy, index, assignment.GetProperties());
                // Remove the old assignment
                assignment.Unassign();

                // Maybe open the code editor for the custom copy
                onCodeRequest?.Invoke(cardCustomCopy.GetUri());
            }
            else
            {
                onCodeRequest?.Invoke(card.GetUri());
            }
        };
        cardDetail.onPreviewCard += (card) =>
        {
            onCodeRequest?.Invoke(card.GetUri());
        };
        closeButton.onClick.AddListener(() =>
        {
            onCloseRequest?.Invoke();
        });
    }
コード例 #30
0
    bool DoesCardMatchSearch(Card card, string searchString)
    {
        ICardModel model = card.GetModel();

        if (!model.IsValid())
        {
            return(false);
        }

        if (searchString.IsNullOrEmpty())
        {
            return(true);
        }
        string stringForSearch = model.GetTitle().ToLower() + " " + model.GetDescription().ToLower();

        return(stringForSearch.Contains(searchString.ToLower()));
    }
コード例 #31
0
ファイル: SummonMove.cs プロジェクト: galaxyyao/TouhouGrave
        public SummonMove(ICardModel model, Player owner, int toZone, ICause cause)
            : base(cause)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }
            else if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }

            m_toZone = owner.m_zones.GetZone(toZone);

            Subject = null;
            Model = model;
            Owner = owner;
        }
コード例 #32
0
ファイル: Transform.cs プロジェクト: galaxyyao/TouhouGrave
        public Transform(CardInstance cardToTransform, ICardModel newModel)
        {
            if (cardToTransform == null)
            {
                throw new ArgumentNullException("cardToTransform");
            }
            else if (newModel == null)
            {
                throw new ArgumentNullException("newModel");
            }
            else if (newModel == cardToTransform.Model)
            {
                throw new ArgumentException("Card will not be transformed.");
            }

            CardToTransform = cardToTransform;
            NewCardModel = newModel;
        }
コード例 #33
0
ファイル: CardDetail.cs プロジェクト: zachary2234/gamebuilder
    public void Populate(ICardModel unassignedCard)
    {
        if (unassignedCard == null || !unassignedCard.IsValid())
        {
            return;
        }

        cardContainer = null;
        card.Populate(unassignedCard, true);
        if (unassignedCard.IsBuiltin())
        {
            codeText.SetText("Duplicate and edit JavaScript");
            trashButton.gameObject.SetActive(false);
            previewButton.gameObject.SetActive(true);
        }
        else
        {
            codeText.SetText("Edit JavaScript");
            previewButton.gameObject.SetActive(false);

            string    behaviorUri  = unassignedCard.GetUnassignedBehaviorItem().behaviorUri;
            VoosActor user         = voosEngine.FindOneActorUsing(behaviorUri);
            string    fromActorLib = actorLib.FindOneActorUsingBehavior(behaviorUri);

            if (user != null)
            {
                trashText.SetText($"Cannot delete - used by actor '{user.GetDisplayName()}'");
                trashButton.interactable = false;
            }
            else if (fromActorLib != null)
            {
                trashText.SetText($"Cannot delete - used by creation library actor '{fromActorLib}'");
                trashButton.interactable = false;
            }
            else
            {
                trashText.SetText($"Remove card");
                trashButton.interactable = true;
            }
            trashButton.gameObject.SetActive(true);
        }
        noPropertiesObject.SetActive(!card.HasAnyProps());
        UpdateAddToSlotButton();
    }
コード例 #34
0
ファイル: ReviveMove.cs プロジェクト: galaxyyao/TouhouGrave
        public ReviveMove(Player player, ICardModel cardToRevive, int fromZone, int toZone, ICause cause)
            : base(cause)
        {
            if (player == null)
            {
                throw new ArgumentNullException("player");
            }
            else if (cardToRevive == null)
            {
                throw new ArgumentNullException("cardToRevive");
            }

            m_fromZone = player.m_zones.GetZone(fromZone);
            m_toZone = player.m_zones.GetZone(toZone);

            Subject = null;
            Player = player;
            CardToRevive = cardToRevive;
        }
コード例 #35
0
    public virtual void Populate(ICardModel card, bool withDetail = false)
    {
        if (card == null || !card.IsValid())
        {
            return;
        }

        // Debug
        this.name = $"Card '{card.GetTitle()}'";

        this.card                    = card;
        this.assignment              = null;
        cardUI.nameField.text        = card.GetTitle();
        cardUI.descriptionField.text = card.GetDescription();
        if (withDetail)
        {
            props.SetupPreview(card.GetUnassignedBehaviorItem());
        }
        customFlag.SetActive(!card.IsBuiltin());
        ReloadCardImage();
    }
コード例 #36
0
    public override void Populate(ICardModel card, bool withDetail = true)
    {
        if (card == null || !card.IsValid())
        {
            return;
        }
        base.Populate(card, withDetail);
        nameInput.text        = card.GetTitle();
        descriptionInput.text = card.GetDescription();

        categoryDropdown.ClearOptions();
        categoryOptions = new List <TMPro.TMP_Dropdown.OptionData>();
        bool needsCustomCategory = true;

        foreach (string category in behaviorSystem.GetCategories())
        {
            if (category == BehaviorCards.CUSTOM_CATEGORY)
            {
                needsCustomCategory = false;
            }
            categoryOptions.Add(new TMPro.TMP_Dropdown.OptionData(category));
        }
        if (needsCustomCategory)
        {
            categoryOptions.Add(new TMPro.TMP_Dropdown.OptionData(BehaviorCards.CUSTOM_CATEGORY));
        }
        categoryDropdown.AddOptions(categoryOptions);

        // Hack: for now, assume that custom cards only have one category
        string cardCategory = new List <string>(card.GetCategories())[0];

        categoryDropdown.value = categoryOptions.FindIndex((option) => option.text == cardCategory);

        bool canEdit = !card.GetUnassignedBehaviorItem().IsBehaviorReadOnly();

        nameInput.interactable        = canEdit;
        descriptionInput.interactable = canEdit;
        categoryDropdown.interactable = canEdit;
        editIconButton.gameObject.SetActive(canEdit);
    }
コード例 #37
0
ファイル: Deck.cs プロジェクト: jamClark/Card-Tricks
        override public void UnregisterCard(ICardModel card)
        {
            ValidateCards();
            if (Multiples == null)
            {
                Multiples = new List <int>();
            }
            int index = _Cards.IndexOf(card as Card);

            if (index > 0)
            {
                //we have multiples of this card, remove one
                Multiples[index]--;
            }
            else if (index == 1)
            {
                //this is the last multiple, complete remove this card
                card.UnregisterWithDeck(this);
                Multiples.RemoveAt(index);
                _Cards.Remove(card as Card);
            }
        }
コード例 #38
0
 private async Task SetCardModel(ICardModel model)
 {
     if (model is DefaultCardModel)
     {
         CardNumberInputTextBox.Text      = string.Empty;
         DateTextBox.Text                 = string.Empty;
         SecurityCodePasswordBox.Password = string.Empty;
         SetState(ControlState.Initial);
         HideAdditionalButtons();
         EnsurePaymentSystemState();
     }
     else if (model is SavedCardModel)
     {
         modelJustSet  = true;
         numberJustSet = true;
         CardNumberInputTextBox.Text = model.Number.FormattedData;
         dateJustSet      = true;
         DateTextBox.Text = model.ExpiryDate.FormattedData;
         SecurityCodePasswordBox.Password = model.SecurityCode.FormattedData;
         EnsurePaymentSystemState();
         numberJustSet = dateJustSet = false;
         await SetNextStateAsync();
     }
 }
コード例 #39
0
ファイル: SummonMove.cs プロジェクト: galaxyyao/TouhouGrave
 public SummonMove(ICardModel model, Player owner, int toZone)
     : this(model, owner, toZone, null)
 { }
コード例 #40
0
ファイル: Pile.cs プロジェクト: galaxyyao/TouhouGrave
 public bool Contains(ICardModel cardModel)
 {
     return m_orderedCardModels.Contains(cardModel);
 }
コード例 #41
0
ファイル: Pile.cs プロジェクト: galaxyyao/TouhouGrave
 /// <summary>
 /// Add one card to the bottom of the pile.
 /// </summary>
 /// <param name="card">The card to be added.</param>
 public void AddToBottom(ICardModel cardModel)
 {
     m_orderedCardModels.Insert(0, cardModel);
 }
コード例 #42
0
ファイル: Pile.cs プロジェクト: galaxyyao/TouhouGrave
 /// <summary>
 /// Add one card to the top of the pile.
 /// </summary>
 /// <param name="card">The card to be added.</param>
 public void AddToTop(ICardModel cardModel)
 {
     m_orderedCardModels.Add(cardModel);
 }
コード例 #43
0
ファイル: CardInstance.cs プロジェクト: galaxyyao/TouhouGrave
 internal CardInstance(ICardModel model, Player owner)
     : this(model, owner, true)
 { }
コード例 #44
0
ファイル: Deck.cs プロジェクト: galaxyyao/TouhouGrave
 public void Add(ICardModel cardModel)
 {
     if (cardModel == null)
     {
         throw new ArgumentNullException("cardModel");
     }
     Cards.Add(cardModel);
 }
コード例 #45
0
ファイル: Deck.cs プロジェクト: galaxyyao/TouhouGrave
 public int IndexOf(ICardModel element)
 {
     return Cards.IndexOf(element);
 }
コード例 #46
0
ファイル: Choice.cs プロジェクト: galaxyyao/TouhouGrave
 public SacrificeChoice(int cardIndex, ICardModel cardModel) : base(1)
 {
     CardIndex = cardIndex;
     CardModel = cardModel;
 }
コード例 #47
0
 public void Respond(ICardModel selectedCard)
 {
     Validate(selectedCard);
     RespondBack(selectedCard);
 }
コード例 #48
0
ファイル: ReviveMove.cs プロジェクト: galaxyyao/TouhouGrave
 public ReviveMove(Player player, ICardModel cardToRevive, int fromZone, int toZone)
     : this(player, cardToRevive, fromZone, toZone, null)
 { }