public static DeckModel ToModel(this Deck deck)
 {
     if (deck == null) return null;
     var model = new DeckModel();
     model.InjectFrom(deck);
     return model;
 }
 private void setDeckInfoMode(DeckModel deck)
 {
     base.transform.localPositionY(-17f);
     yesNoButton.SetActive(isActive: false);
     Title.text            = deck.Name;
     Title.supportEncoding = false;
     BGTex.transform.localPositionY(20f);
     BGTex.height      = 457;
     isInfoMode        = true;
     AlertMessage.text = string.Empty;
 }
Beispiel #3
0
        public void Initialize(DeckModel deckModel, List <IsGoCondition> conditions)
        {
            mDeckModel  = deckModel;
            mConditions = conditions;
            mTexture_DeckNo.mainTexture   = Resources.Load <Texture>($"Textures/Common/DeckFlag/icon_deck{deckModel.Id}");
            mTexture_FlagShip.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(deckModel.GetFlagShip().MstId, (!deckModel.GetFlagShip().IsDamaged())? 1 : 2);

            bool battleCondition = IsStartBattleCondition();

            InitializeCondition(battleCondition);
        }
Beispiel #4
0
 public void GotoOrganize()
 {
     if (base.isRun)
     {
         DeckModel deckModel = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDecks().FirstOrDefault((DeckModel x) => x.Count == 0);
         if (deckModel != null)
         {
             SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck = deckModel;
             SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(Generics.Scene.Organize);
         }
     }
 }
Beispiel #5
0
        public IActionResult ViewCards(DeckModel deck)
        {
            User user = authProvider.GetCurrentUser();

            if (ModelState.IsValid && decksDAL.VerifyDeckByUser(user, deck))
            {
                decksDAL.UpdateDeck(deck);
                return(RedirectToAction("ViewCards", new { deckId = deck.id }));
            }

            return(View());
        }
        private IEnumerator OnPushStatePracticeTypeSelectCoroutine()
        {
            DeckModel friendDeckModel = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck;

            mPracticeHeader.UpdateHeaderText("演習選択");
            mPracticeMenu.SetActive(isActive: true);
            mPracticeMenu.Initialize(friendDeckModel);
            mKeyController.ClearKeyAll();
            mKeyController.firstUpdate = true;
            mPracticeMenu.SetKeyController(mKeyController);
            yield return(new WaitForEndOfFrame());
        }
Beispiel #7
0
 public PublicSlideMenuItem(DeckModel deck, TableOfContentsModel.EntryCollection bucket, DeckTraversalModel traversal, PresenterModel model)
     : base(Strings.CopyToPublic)
 {
     this.m_Deck = deck;
     this.m_WhereTheEntriesGo = bucket;
     this.traversal_          = traversal;
     this.m_Model             = model;
     if ((deck.Disposition & DeckDisposition.StudentSubmission) == 0)          // Only enable for student submissions
     {
         this.Enabled = false;
     }
 }
 public static DeckResponse FromDeck(DeckModel deck)
 {
     return(new DeckResponse
     {
         Name = deck.Title,
         Id = deck.Id,
         GamesCount = deck.PlayedCount,
         CardsCount = deck.CardsCount,
         UserRating = deck.Rating,
         LastRepeatTime = deck.LastRepetition
     });
 }
 public void UpdateFurnitures(DeckModel deckModel, Dictionary <FurnitureKinds, FurnitureModel> furnitureSet)
 {
     mDeckModel = deckModel;
     foreach (KeyValuePair <FurnitureKinds, FurnitureModel> item in furnitureSet)
     {
         if (IsNeedUpdateFurniture(item.Key, item.Value))
         {
             UpdateFurniture(deckModel, item.Key, item.Value);
             mFurnituresSet[item.Key] = item.Value;
         }
     }
 }
Beispiel #10
0
        public DeckUndoService(EventQueue dispatcher, UndoModel undo, DeckModel deck)
        {
            this.m_EventQueue = dispatcher;
            this.m_Undo       = undo;
            this.m_Deck       = deck;

            this.m_DeckChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleDeckChanged));
            this.m_Deck.Changed["HumanName"].Add(this.m_DeckChangedDispatcher.Dispatcher);
            this.m_Deck.TableOfContents.Changed["Entries"].Add(this.m_DeckChangedDispatcher.Dispatcher);

            this.m_EntriesCollectionHelper = new EntriesCollectionHelper(this);
        }
        public bool AddDeck(string username, DeckModel deck)
        {
            var user = _collection.AsQueryable().Single(x => x.UserName == username);

            if (user.Decks.Any(x => x.Id == deck.Id))
            {
                return(false);
            }
            user.Decks.Add(deck);
            _collection.Update(x => x.UserName == username, user);
            return(true);
        }
Beispiel #12
0
    /*
     *
     * //add to any place:
     * //  onTryAnswerSend += onTryAnswer;
     * public delegate void TryAnswerCallback(int _answerId);
     * // Event declaration
     * public event TryAnswerCallback onTryAnswerSend;
     * void onTryAnswer(int _answerId)
     * {
     *  Debug.Log("onTryAnswer called.");
     * }
     *
     * public void tryAnswer(int _id)
     * {
     *  if (onTryAnswerSend != null)
     *      onTryAnswerSend(_id);
     * }
     */

    private void doStartNewGame(int _invalidWantPosID)
    {
        isEndGameState = 0;
        collider.size  = new Vector2(0, 0);
        stopWinAnimation();

        DeckModel thisDeckModel = deck.GetComponent <DeckModel>();
        DeckView  thisDeckView  = deck.GetComponent <DeckView>();

        thisDeckModel.Shuffle();
        thisDeckView.ShowCards(_invalidWantPosID);
    }
        public SSSlideNetworkService(SendingQueue sender, PresentationModel presentation, DeckModel deck, SlideModel slide)
        {
            this.m_Sender       = sender;
            this.m_Presentation = presentation;
            this.m_Deck         = deck;
            this.m_Slide        = slide;

            this.m_SubmissionStyleChangeDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleChange));
            this.m_Slide.Changed["SubmissionStyle"].Add(this.m_SubmissionStyleChangeDispatcher.Dispatcher);

            this.m_AnnotationSheetsCollectionHelper = new SSSheetsCollectionHelper(this, "AnnotationSheets", SheetMessage.SheetCollection.AnnotationSheets);
        }
        protected override bool UpdateTarget(ReceiveContext context)
        {
            TableOfContentsModel.Entry entry = this.Target as TableOfContentsModel.Entry;
            if (entry == null)
            {
                return(false);
            }

            ///get the deckmodel we'll be dealing with
            ///I think this is a very ugly way of getting it.
            DeckModel deck = (DeckModel)this.Parent.Parent.Target;

            // Locking the TableOfContents locks the entry, its parent, and everything else in the TOC.
            using (Synchronizer.Lock(deck.TableOfContents.SyncRoot)) {
                // We created the entry on the local side, so if the TOCs don't match, some message's OnReceive screwed up.
                // Similarly, if the entry is not a child of its parent, then it's the local OnReceive that screwed up.
                Debug.Assert(entry.TableOfContents == deck.TableOfContents);

                TableOfContentsModel.Entry parent = entry.Parent;
                // Note: The entry might not be a child of its parent if network messages are processed out of order,
                // or if weird things happen like a DeckTraversalMessage causing an entry to get created before it's
                // added to the table of contents.
                if (parent != null)
                {
                    using (Synchronizer.Lock(parent.SyncRoot)) {
                        foreach (TableOfContentsModel.Entry child in parent.Children)
                        {
                            if (child.Id.Equals(this.TargetId))
                            {
                                parent.Children.BroadcastRemove(child);
                            }
                        }
                    }
                }
                else if (deck != null)
                {
                    ///remove the TOC entry we need to remove by iterating through all the TOC entries
                    ///and comparing using a backwards loop.
                    using (Synchronizer.Lock(deck.TableOfContents.SyncRoot)) {
                        for (int i = deck.TableOfContents.Entries.Count - 1; i >= 0; i--)
                        {
                            TableOfContentsModel.Entry child = deck.TableOfContents.Entries[i];
                            if (child.Id.Equals(this.TargetId))
                            {
                                deck.TableOfContents.Entries.BroadcastRemoveAt(i);
                            }
                        }
                    }
                }
            }

            return(false);
        }
Beispiel #15
0
            /// <summary>
            /// Constructor for the panel that will be used to organize the
            /// various student submissions
            /// </summary>
            /// <param name="deck">The DeckModel whose slides we will be
            /// organizing</param>
            /// <param name="location">The location of this control in the
            /// parent</param>
            /// <param name="size">The size of this control</param>
            /// <param name="tabIndex">The tab index of this control</param>
            public SSOrganizerMainPanel(DeckModel deck, Point location,
                                        Size size, int tabIndex)
            {
                // Stop layout
                this.SuspendLayout();

                // Set all the parameters of the object
                this.Font        = ViewerStateModel.StringFont;
                this.BorderStyle = BorderStyle.Fixed3D;
                this.Location    = location;
                this.Name        = "tabControl";
                this.Size        = size;
                this.TabIndex    = tabIndex;
                this.Anchor      = AnchorStyles.Left |
                                   AnchorStyles.Top |
                                   AnchorStyles.Right |
                                   AnchorStyles.Bottom;

                // Add each slide as a control
                Color deckColor = Color.Transparent;
                int   i         = 0;

                if (deck != null)
                {
                    using (Synchronizer.Lock(deck.SyncRoot)) {
                        // Get the deck color
                        deckColor = deck.DeckBackgroundColor;
                        if (deck.TableOfContents != null)
                        {
                            using (Synchronizer.Lock(deck.TableOfContents.SyncRoot)) {
                                // Create a child control for each submission
                                foreach (TableOfContentsModel.Entry e in
                                         deck.TableOfContents.Entries)
                                {
                                    this.Controls.Add(new SSOrganizerEntry(i++,
                                                                           e, deckColor, new PointF(0.5f, 0.5f),
                                                                           new SizeF(1.0f, 1.0f)));
                                }
                            }
                        }
                    }
                }

                // TODO CMPRINCE: Remove this in the final version
                // Bring the last entry to the front
                if (this.Controls.Count > 0)
                {
                    this.Controls[this.Controls.Count - 1].BringToFront();
                }

                // Start the layout again
                this.ResumeLayout();
            }
        public TextSheetUndoService(EventQueue dispatcher, UndoModel undo, DeckModel deck, SlideModel slide, TextSheetModel sheet) : base(undo, deck, slide, sheet)
        {
            this.m_EventQueue             = dispatcher;
            this.m_SheetChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleSheetChanged));

            //Ignore any sheets with the Remote flag
            if ((sheet.Disposition & SheetDisposition.Remote) == 0)
            {
                this.Sheet.Changed["Text"].Add(this.m_SheetChangedDispatcher.Dispatcher);
                this.Sheet.Changed["Font"].Add(this.m_SheetChangedDispatcher.Dispatcher);
            }
        }
Beispiel #17
0
 public void InitDeck(DeckModel deck)
 {
     this.deck = deck;
     for (int i = 0; i < 6; i++)
     {
         if (this._shipBanner[i] != null)
         {
             this._shipBanner[i].SetBanner((i >= this.shipCount) ? null : deck.GetShip(i), i);
         }
     }
     this.UpdateCurrentItem(0);
 }
Beispiel #18
0
 public ShienModel_Air(DeckModel shien_deck, List <ShipModel_BattleAll> ships_f, List <ShipModel_BattleAll> ships_e, SupportAtack data)
     : base(ships_f, ships_e, data.AirBattle)
 {
     _shien_deck_id = shien_deck.Id;
     _ships_shien   = new List <ShipModel_Attacker>();
     ShipModel[] ships = shien_deck.GetShips();
     for (int i = 0; i < ships.Length; i++)
     {
         _ships_shien.Add(new __ShipModel_Attacker__(ships[i], i));
     }
     _Initialize();
 }
Beispiel #19
0
        public SheetNetworkService(SendingQueue sender, PresentationModel presentation, DeckModel deck, SlideModel slide, SheetModel sheet, SheetMessage.SheetCollection selector)
        {
            this.m_Sender       = sender;
            this.m_Presentation = presentation;
            this.m_Deck         = deck;
            this.m_Slide        = slide;
            this.m_Sheet        = sheet;
            this.m_Selector     = selector;

            this.m_BoundsChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.Sender, new PropertyEventHandler(this.HandleBoundsChanged));
            this.m_Sheet.Changed["Bounds"].Add(this.m_BoundsChangedDispatcher.Dispatcher);
        }
        public void RefreshTitle(ScreenStatus status, DeckModel deck)
        {
            string text = string.Empty;

            switch (status)
            {
            case ScreenStatus.SELECT_DECK_SHIP:
                text = ((!(deck.Name == string.Empty)) ? ("艦娘選択 -" + deck.Name + "-") : ("艦娘選択 - 第" + deck.Id + "艦隊 -"));
                break;

            case ScreenStatus.SELECT_OTHER_SHIP:
                text = "艦娘選択 - その他 -";
                break;

            case ScreenStatus.SELECT_SETTING_MODE:
                text = "メニュ\u30fc選択";
                break;

            case ScreenStatus.MODE_SOUBI_HENKOU:
            case ScreenStatus.MODE_SOUBI_HENKOU_TYPE_SELECT:
            case ScreenStatus.MODE_SOUBI_HENKOU_ITEM_SELECT:
            case ScreenStatus.MODE_SOUBI_HENKOU_PREVIEW:
                text = "装備変更";
                break;

            case ScreenStatus.MODE_KINDAIKA_KAISHU:
            case ScreenStatus.MODE_KINDAIKA_KAISHU_SOZAI_SENTAKU:
            case ScreenStatus.MODE_KINDAIKA_KAISHU_KAKUNIN:
            case ScreenStatus.MODE_KINDAIKA_KAISHU_ANIMATION:
            case ScreenStatus.MODE_KINDAIKA_KAISHU_END_ANIMATION:
                text = "近代化改修";
                break;

            case ScreenStatus.MODE_KAIZO:
            case ScreenStatus.MODE_KAIZO_ANIMATION:
            case ScreenStatus.MODE_KAIZO_END_ANIMATION:
                text = "改造";
                break;
            }
            if (deck != null && deck.IsActionEnd())
            {
                mTransform_TurnEndStamp.SetActive(isActive: true);
                mTransform_TurnEndStamp.DOKill();
                mTransform_TurnEndStamp.DOLocalRotate(new Vector3(0f, 0f, 300f), 0f, RotateMode.FastBeyond360);
                mTransform_TurnEndStamp.DOLocalRotate(new Vector3(0f, 0f, 360f), 0.8f, RotateMode.FastBeyond360).SetEase(Ease.OutBounce);
            }
            else
            {
                mTransform_TurnEndStamp.SetActive(isActive: false);
            }
            titleLabel.text            = text;
            titleLabel.supportEncoding = false;
        }
Beispiel #21
0
        public async Task Given_A_Valid_Deck_Should_Invoke_GetCardById_Method_Twice()
        {
            // Arrange
            const int expected = 2;

            var newDeck = new DeckModel
            {
                UserId      = Guid.NewGuid().ToString(),
                Name        = "Jinzo Deck",
                Description = "Machines are coming.",
                MainDeck    = new List <CardModel>
                {
                    new CardModel {
                        Id = 34230233
                    },
                },
                ExtraDeck = new List <CardModel>
                {
                    new CardModel {
                        Id = 31386180
                    },
                },
                SideDeck = new List <CardModel>()
            };

            _deckTypeRepository.AllDeckTypes().Returns(new List <DeckType>
            {
                new DeckType
                {
                    Id   = 23424,
                    Name = "Main",
                },
                new DeckType
                {
                    Id   = 23424,
                    Name = "Extra",
                },
                new DeckType
                {
                    Id   = 23424,
                    Name = "Side",
                }
            });

            _cardRepository.GetCardById(Arg.Any <long>()).Returns(new Card());

            // Act
            await _sut.Add(newDeck);

            // Assert
            await _cardRepository.Received(expected).GetCardById(Arg.Any <long>());
        }
        private bool validCheck(TaskStrategyCommandMenu.MENU_NAME menuName)
        {
            DeckModel            currentDeck = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck;
            List <IsGoCondition> list        = new List <IsGoCondition>();

            switch (menuName)
            {
            case TaskStrategyCommandMenu.MENU_NAME.SALLY:
                list = currentDeck.IsValidSortie();
                break;

            case TaskStrategyCommandMenu.MENU_NAME.MOVE:
                list = currentDeck.IsValidMove();
                break;

            case TaskStrategyCommandMenu.MENU_NAME.DEPLOY:
            {
                int num = StrategyTopTaskManager.Instance.TileManager.FocusTile.areaID;
                if (num == 15 || num == 16 || num == 17)
                {
                    CommonPopupDialog.Instance.StartPopup("この海域には配備出来ません");
                    return(false);
                }
                break;
            }

            case TaskStrategyCommandMenu.MENU_NAME.ENSEI:
                list = currentDeck.IsValidMission();
                break;

            case TaskStrategyCommandMenu.MENU_NAME.ENSYU:
                list = currentDeck.IsValidPractice();
                break;
            }
            bool flag = list.get_Count() == 0;

            if (!flag)
            {
                CommonPopupDialog.Instance.StartPopup(Util.getCancelReason(list.get_Item(0)));
            }
            else
            {
                bool flag2 = TaskStrategyCommandMenu.MENU_NAME.ENSEI == menuName;
                bool flag3 = !StrategyTopTaskManager.GetLogicManager().GetMissionAreaId().Contains(SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID);
                if (flag3 && flag2)
                {
                    CommonPopupDialog.Instance.StartPopup("この海域の遠征任務は解放されていません");
                    return(false);
                }
            }
            return(flag);
        }
Beispiel #23
0
        public void UpdateFurniture(DeckModel deckModel, FurnitureKinds furnitureKind, FurnitureModel changeToFurniture)
        {
            UIFurniture uIFurniture = UserInterfacePortInteriorManager.UIPortInteriorFactory.GenerateFurniturePrefab(changeToFurniture);

            UIFurniture.UIFurnitureModel uiFurnitureModel = new UIFurniture.UIFurnitureModel(changeToFurniture, deckModel);
            UIFurniture uIFurniture2 = null;

            switch (furnitureKind)
            {
            case FurnitureKinds.Floor:
                this.ClearFurniture(this.mFloor);
                uIFurniture2 = NGUITools.AddChild(this.mFloor.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Wall:
                this.ClearFurniture(this.mWall);
                uIFurniture2 = NGUITools.AddChild(this.mWall.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Window:
                this.ClearFurniture(this.mWindow);
                uIFurniture2 = NGUITools.AddChild(this.mWindow.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Hangings:
                this.ClearFurniture(this.mHangings);
                uIFurniture2 = NGUITools.AddChild(this.mHangings.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Chest:
                this.ClearFurniture(this.mChest);
                uIFurniture2 = NGUITools.AddChild(this.mChest.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Desk:
                this.ClearFurniture(this.mDesk);
                uIFurniture2 = NGUITools.AddChild(this.mDesk.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;
            }
            bool flag = uIFurniture2.GetComponent <UIDynamicFurniture>() != null;

            if (flag)
            {
                uIFurniture2.GetComponent <UIDynamicFurniture>().SetOnActionEvent(new Action <UIDynamicFurniture>(this.OnFurnitureActionEvent));
            }
        }
Beispiel #24
0
 public void Initialize(DeckModel deckModel)
 {
     this.mUIRemodelShipSliderThumb_Thumb.get_transform().set_localPosition(Vector3.get_zero());
     this.mDeckModel  = deckModel;
     this.mShipCount  = this.mDeckModel.GetShips().Length;
     this.mCellHeight = 46;
     DOVirtual.Float((float)this.mWidget_SliderLimit.height, (float)(this.mCellHeight * (this.mShipCount - 1)), 0.3f, delegate(float value)
     {
         this.mWidget_SliderLimit.height = (int)value;
     });
     this.mIndex            = 0;
     this.mLabel_Index.text = (this.mIndex + 1).ToString();
 }
Beispiel #25
0
 public void InitializeFurnituresForConfirmation(DeckModel deckModel, Dictionary <FurnitureKinds, FurnitureModel> furnitureSet)
 {
     this.mDeckModel     = deckModel;
     this.mFurnituresSet = furnitureSet;
     using (Dictionary <FurnitureKinds, FurnitureModel> .Enumerator enumerator = furnitureSet.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             KeyValuePair <FurnitureKinds, FurnitureModel> current = enumerator.get_Current();
             this.UpdateFurniture(deckModel, current.get_Key(), current.get_Value());
         }
     }
 }
Beispiel #26
0
        public static Deck ConvertFromDeckModelToDeck(DeckModel deckModel)
        {
            ICardDBIF        cardDB    = new CardDB();
            List <CardModel> deckCards = cardDB.GetCardsByDeckId(deckModel.Id);
            Deck             deck      = new Deck()
            {
                Id       = deckModel.Id,
                DeckName = deckModel.DeckName,
                cards    = CardConverter.ConvertFromListOfCardModelToListOfCard(deckCards)
            };

            return(deck);
        }
        private IEnumerator OpenConfirmDialog(DeckModel deck)
        {
            yield return(new WaitForEndOfFrame());

            StrategyDialog.disableBackTouch();
            StrategyDialog.isUseDefaultKeyController = false;
            StrategyDialog.OpenDialog(2);
            StrategyTaskManager.GetStrategyRebellion().keycontrol.IsRun = false;
            StrategyDialog.setOpenAction(delegate
            {
                this.GoSortieConfirm.SetKeyController(new KeyControl());
            });
        }
Beispiel #28
0
 public void Initialize(DeckModel deckModel)
 {
     mUIRemodelShipSliderThumb_Thumb.transform.localPosition = Vector3.zero;
     mDeckModel  = deckModel;
     mShipCount  = mDeckModel.GetShips().Length;
     mCellHeight = 46;
     DOVirtual.Float(mWidget_SliderLimit.height, mCellHeight * (mShipCount - 1), 0.3f, delegate(float value)
     {
         mWidget_SliderLimit.height = (int)value;
     });
     mIndex            = 0;
     mLabel_Index.text = (mIndex + 1).ToString();
 }
Beispiel #29
0
        public List <CardBase> CreateRemainingHand(DeckModel defaultDeck, List <CardBase> handCards)
        {
            var remainingCards = new List <CardBase>();

            remainingCards.AddRange(defaultDeck.Cards);

            foreach (var card in handCards)
            {
                remainingCards.Remove(card);
            }

            return(remainingCards);
        }
Beispiel #30
0
    public void Start()
    {
        model = GetComponent <DeckModel>();

        discardSlots = GetComponent <Slots>();
        discardSlots.occupyEvent.AddListener(OnOccupyDiscardSlot);
        discardSlots.releaseEvent.AddListener(OnReleaseDiscardSlot);

        deckText.text    = model.library.Count.ToString();
        discardText.text = model.discard.Count.ToString();

        HideDeck();
    }
Beispiel #31
0
        public PlayerModel CreatePlayer(int id, string name, DeckModel defaultDeck)
        {
            var player = new PlayerModel
            {
                Id           = id,
                Name         = name,
                SelectedDeck = defaultDeck,
                Hand         = CreateStartHand(defaultDeck),
                Used         = new List <CardBase>()
            };

            return(player);
        }
 public SelectDeck(DeckModel deck)
 {
     Deck = deck;
 }
 public SelectDeck(DeckModel deck)
 {
     this.Deck = deck;
 }