Esempio n. 1
0
        protected override Decision ConsultChanllenged(GameStatus gameStatus, CardStatus cardStatus, PlayerStatus playerStatus, int betShort)
        {
            bool raise = DateTimeOffset.UtcNow.Ticks % 17 == 0;

            if (raise)
            {
                return(new Decision()
                {
                    DecisionEnum = DecisionEnum.Raise,
                    Chips = betShort + 10
                });
            }
            else
            {
                bool fold = DateTimeOffset.UtcNow.Ticks % 3 == 0;
                if (fold)
                {
                    return(new Decision()
                    {
                        DecisionEnum = DecisionEnum.Fold
                    });
                }
                else
                {
                    return(new Decision()
                    {
                        DecisionEnum = DecisionEnum.Call,
                        Chips = betShort
                    });
                }
            }
        }
    public void AddTemCard(CardStatus cardInfo, int index)
    {
        // if (index == _temCardIndex)//如果临时卡存在
        // {
        //     return;//返回
        // }
        if (IsTem())
        {
            RemoveAllTemp();//删除现有临时卡
        }
        if (cardInfo == null || index == -1)
        {
            // _temCardIndex = -1;
            return;
        }
        // _temCardIndex = index;
        var newCard = Instantiate(CardPrefab);

        newCard.GetComponent <CardShowInfo>().CurrentCore = cardInfo;
        newCard.GetComponent <CardShowInfo>().IsGray      = true;
        newCard.GetComponent <CardMoveInfo>().IsCanSelect = false;
        newCard.GetComponent <CardMoveInfo>().IsTem       = true;
        newCard.transform.SetParent(transform);
        newCard.transform.SetSiblingIndex(index);
        newCard.transform.localPosition = new Vector3((IsLock ? 0 : (-(transform.childCount - 1f) * XSize / 2f)) + index * XSize, -YSize * index, -0.1f - 0.01f * index);
        ResetCards();
    }
Esempio n. 3
0
        protected void InsertAppData()
        {
            StringBuilder appDataSb = new StringBuilder();

            appDataSb.Append("window.appData = {");
            appDataSb.Append("dictionaries: {");
            appDataSb.Append("inputDocTypes: [" + FormatDictionaryList(InputDocType.GetAll(), "InputDocTypeID") + "], ");
            appDataSb.Append("inputMethods: [" + FormatDictionaryList(InputMethod.GetAll(), "InputMethodID") + "], ");
            appDataSb.Append("inputSigns: [" + FormatDictionaryList(InputSign.GetAll(), "InputSignID") + "], ");
            appDataSb.Append("inputSubjectTypes: [" + FormatDictionaryList(InputSubjectType.GetAll(), "InputSubjectTypeID") + "], ");
            appDataSb.Append("deliveryTypes: [" + FormatDictionaryList(DeliveryType.GetAll(), "DeliveryTypeID") + "] ,");
            appDataSb.Append("socialStatuses: [" + FormatDictionaryList(SocialStatus.GetAll(), "SocialStatusID") + "], ");
            appDataSb.Append("branchTypes: [" + FormatDictionaryList(BranchType.GetAll(), "BranchTypeID") + "], ");
            appDataSb.Append("socialCategories: [" + FormatDictionaryList(SocialCategory.GetAll(), "SocialCategoryID") + "], ");
            appDataSb.Append("cardStatuses: [" + FormatDictionaryList(CardStatus.GetAll(), "CardStatusID") + "], ");
            appDataSb.Append("labels: [" + FormatDictionaryList(Label.GetList(), "LabelID") + "], ");
            appDataSb.Append("docStatuses: [" + FormatDictionaryList(DocStatus.GetAll(), "DocStatusID") + "]");
            appDataSb.Append("}");
            appDataSb.Append("}");

            HtmlGenericControl scriptControl = new HtmlGenericControl("script");

            scriptControl.Attributes["type"] = "text/javascript";
            scriptControl.InnerHtml          = appDataSb.ToString();
            Page.Header.Controls.AddAt(0, scriptControl);
        }
        //Создать строку вставки интервала статуса работника
        public string CreateStrInsertCardStatus(CardStatus сardStatus)
        {
            if (сardStatus == null)
            {
                return(string.Empty);
            }

            StringBuilder sql = new StringBuilder();

            sql.Append(@"Insert into CardStatus (CardStatus_PersCard_Id");
            if (сardStatus.CardStatus_PerBeg != DateTime.MinValue)
            {
                sql.Append(@",CardStatus_PerBeg");
            }
            if (сardStatus.CardStatus_PerEnd != DateTime.MinValue)
            {
                sql.Append(@",CardStatus_PerEnd");
            }
            sql.Append(@",CardStatus_Type) values (");
            sql.Append(сardStatus.CardStatus_PersCard_Id);
            if (сardStatus.CardStatus_PerBeg != DateTime.MinValue)
            {
                sql.AppendFormat(", {{d'{0}'}}", сardStatus.CardStatus_PerBeg.ToString("yyyy-MM-dd"));
            }
            if (сardStatus.CardStatus_PerEnd != DateTime.MinValue)
            {
                sql.AppendFormat(", {{d'{0}'}}", сardStatus.CardStatus_PerEnd.ToString("yyyy-MM-dd"));
            }
            sql.AppendFormat(", {0} );", сardStatus.CardStatus_Type);
            return(sql.ToString());
        }
Esempio n. 5
0
        public void UpdateCard
        (
            [JetBrains.Annotations.NotNull] Card card,
            CardStatus newStatus
        )
        {
            if (ReferenceEquals(card, null))
            {
                throw new ArgumentNullException("card");
            }

            if (card.Status == newStatus)
            {
                Output.WriteLine
                (
                    "Нет нужды в обновлении статуса карты {0}",
                    card
                );
                return;
            }

            card.Status = newStatus;
            Output.WriteLine
            (
                "Статус карты {0} изменен на {1}",
                card.Id,
                newStatus
            );
            Db.Update(card);
            Output.WriteLine
            (
                "Обновлена карточка: {0}",
                card
            );
        }
Esempio n. 6
0
 public void SetCard(CardStatus cardStatus)
 {
     if (cardStatus.IsCardBack || cardStatus.Conceal)
     {
         return;
     }
     if (HeadMap == null || ContentMap == null)
     {
         Init();
     }
     Head.sprite       = HeadMap[cardStatus.Faction];
     Bottom.sprite     = ContentMap[cardStatus.Faction];
     CardInfoText.text = ToTrueString(cardStatus.Info);
     CardNameText.text = ToTrueString(cardStatus.Name);
     TagsText.text     = ToTrueString(cardStatus.Categories.Select(x => GwentMap.CategorieInfoMap[x]).Join(", "));
     if (cardStatus.IsImmue)
     {
         TagsText.text += string.IsNullOrWhiteSpace(TagsText.text) ? "免疫" : ", 免疫";
     }
     if (cardStatus.IsDoomed && !TagsText.text.Contains("佚亡"))
     {
         TagsText.text += string.IsNullOrWhiteSpace(TagsText.text) ? "佚亡" : ", 佚亡";
     }
     Content.sizeDelta = new Vector2(Content.sizeDelta.x, CardInfoText.preferredHeight + 115);
     // Debug.Log(CardInfoText.preferredHeight);
 }
        private void FillDataRec(SqlDataReader reader, CardStatus CardStatus)
        {
            int      resInt  = 0;
            DateTime resDate = DateTime.MinValue;

            if (int.TryParse(reader["CardStatus_Id"].ToString(), out resInt))
            {
                CardStatus.CardStatus_Id = resInt;
            }
            if (int.TryParse(reader["CardStatus_PersCard_Id"].ToString(), out resInt))
            {
                CardStatus.CardStatus_PersCard_Id = resInt;
            }
            if (DateTime.TryParse(reader["CardStatus_PerBeg"].ToString(), out resDate))
            {
                CardStatus.CardStatus_PerBeg = resDate;
            }
            if (DateTime.TryParse(reader["CardStatus_PerEnd"].ToString(), out resDate))
            {
                CardStatus.CardStatus_PerEnd = resDate;
            }
            if (int.TryParse(reader["CardStatus_Type"].ToString(), out resInt))
            {
                CardStatus.CardStatus_Type = resInt;
            }
        }
Esempio n. 8
0
        private CompareResult Evaluate(GameStatus gameStatus, CardStatus cardStatus, PlayerStatus playerStatus)
        {
            var hostFighter = new Fighter(cardStatus.Holes);
            var round       = new Round();

            round.SetHostFighter(hostFighter);
            if (cardStatus.Flops.Count != 0)
            {
                round.SetFlops(cardStatus.Flops);
            }

            if (cardStatus.Turn != null)
            {
                round.SetTurn(cardStatus.Turn);
            }

            if (cardStatus.River != null)
            {
                round.SetRiver(cardStatus.River);
            }

            var compareResult = round.Evaluate();

            return(compareResult);
        }
Esempio n. 9
0
        public ActionResult BuyBitcoin(string cardId)
        {
            if (string.IsNullOrEmpty(cardId))
            {
                return(RedirectToAction("Index", "Transfer"));
            }

            //Get the card for the passed cardId
            Card card;

            using (var db = new DiamondCircle_dbEntities())
            {
                card = db.Cards.Where(c => c.CardId == cardId).FirstOrDefault();
                if (card == null)
                {
                    return(RedirectToAction("Index", "Transfer"));
                }
            }

            //Check whether there is a credit card for that card set up
            if (!card.CreditCardId.HasValue)
            {
                //Redirect to set up a credit card
                return(RedirectToAction("Create", "CreditCard", new { CardId = cardId, redirectUrl = "BuyBitcoin,BuyBitcoin" }));
            }

            var model = new BuyBitcoinViewModel()
            {
                CardId = cardId, CreditCardMask = CardStatus.MaskCardNumber(card.CreditCard.CardNumber)
            };

            return(View());
        }
Esempio n. 10
0
    // Update is called once per frame
    void Update()
    {
        if (_cardStatus == CardStatus.Active)
        {
            _cardStatus = CardStatus.Prepare;
        }

        if (_cardStatus == CardStatus.Prepare)
        {
            DoPrepare();
        }

        if (_cardStatus == CardStatus.PrepareCompleted)
        {
            DoRunIn();
        }

        if (_cardStatus == CardStatus.RunInCompleted)
        {
            DoRun();
        }

        if (_cardStatus == CardStatus.RunCompleted)
        {
            DoRunOut();
        }

        if (_cardStatus == CardStatus.RunOutCompleted)
        {
            DoEnd();
        }
    }
Esempio n. 11
0
        protected override Decision ConsultChanllenged(GameStatus gameStatus, CardStatus cardStatus, PlayerStatus playerStatus, int betShort)
        {
            var compareResult = Evaluate(gameStatus, cardStatus, playerStatus);

            if (compareResult.WinRatio > _chanllengedRaiseBar)
            {
                return(new Decision()
                {
                    DecisionEnum = DecisionEnum.Raise,
                    Chips = betShort + 10
                });
            }

            if (compareResult.WinRatio > _chanllengedCallBar)
            {
                return(new Decision()
                {
                    DecisionEnum = DecisionEnum.Call,
                    Chips = betShort
                });
            }

            return(new Decision()
            {
                DecisionEnum = DecisionEnum.Fold
            });
        }
Esempio n. 12
0
        /// <summary>
        /// 初始化卡座
        /// </summary>
        /// <param name="port_name"></param>
        /// <param name="bps"></param>
        /// <returns></returns>
        //public static Status Open()
        //{
        //    if (!IsUse) return Status.CARD_SUCC;
        //    try
        //    {
        //        Status ret = (Status)Card_Init(Port, Bps, iniMode);
        //        if (ret != Status.CARD_SUCC)
        //        {
        //            Log.Warn("[CardReader][Open]" + ret.ToString());
        //        }
        //        return ret;
        //    }
        //    catch (System.Exception e)
        //    {
        //        Log.Error("[CardReader][Open]Error!\n" + e.ToString());
        //        return Status.CARD_FAIL;
        //    }
        //}

        /// <summary>
        /// 读卡状态
        /// </summary>
        /// <param name="nCardPos">端口号</param>
        /// <returns></returns>
        public static Status GetStatus(ref CardStatus cardPos)
        {
            if (!IsUse)
            {
                return(Status.CARD_SUCC);
            }
            try
            {
                int    nCardPos = 0;
                Status ret      = (Status)Card_GetStatus(out nCardPos);
                if (ret != Status.CARD_SUCC)
                {
                    Log.Warn("[CardReader][GetStatus]" + ret.ToString());
                }
                else
                {
                    cardPos = (CardStatus)nCardPos;
                }
                return(ret);
            }
            catch (System.Exception e)
            {
                Log.Error("[CardReader][GetStatus]Error!\n" + e.ToString());
                return(Status.CARD_FAIL);
            }
        }
Esempio n. 13
0
 public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
 {
     if (stream.IsWriting)
     {
         stream.SendNext(ID);
         stream.SendNext(cardName);
         stream.SendNext(cardDescription);
         stream.SendNext(cardType);
         stream.SendNext(imageFilepath);
         stream.SendNext(attackAmount);
         stream.SendNext(defenseAmount);
         stream.SendNext(value);
         stream.SendNext(isFusable);
         stream.SendNext(cardHP);
         stream.SendNext(cardStatus);
         stream.SendNext(ownedByPlayer);
         stream.SendNext(Index);
     }
     else
     {
         ID              = (int)stream.ReceiveNext();
         cardName        = (string)stream.ReceiveNext();
         cardDescription = (string)stream.ReceiveNext();
         cardType        = (CardType)stream.ReceiveNext();
         imageFilepath   = (string)stream.ReceiveNext();
         attackAmount    = (int)stream.ReceiveNext();
         defenseAmount   = (int)stream.ReceiveNext();
         value           = (int)stream.ReceiveNext();
         isFusable       = (bool)stream.ReceiveNext();
         cardHP          = (int)stream.ReceiveNext();
         cardStatus      = (CardStatus)stream.ReceiveNext();
         ownedByPlayer   = (int)stream.ReceiveNext();
         Index           = (int)stream.ReceiveNext();
     }
 }
Esempio n. 14
0
 public Card()
 {
     SynCode = 0;
     ProjectId = 0;
     Name = null;
     _status = CardStatus.NotSet;
 }
Esempio n. 15
0
 public Card(long newSynCode, long newProjectId, string newName)
 {
     ProjectId = newProjectId;
     Name = newName;
     SynCode = newSynCode;
     _status = CardStatus.Assigned;
 }
Esempio n. 16
0
        //Обновление строки
        private void UpdateCardStatus()
        {
            if (dgvCardStatus.CurrentRow == null)
            {
                return;
            }
            CardStatus cardStatus = dgvCardStatus.CurrentRow.DataBoundItem as v_CardStatus;

            if (cardStatus == null)
            {
                MessageBox.Show("Не знайдений рядок для оновлення", "Помилка");
                return;
            }
            fmPersCardStatusEdit fmCardStatusEdit = new fmPersCardStatusEdit(EnumFormMode.Edit, "Зміна інтервалу");

            fmCardStatusEdit.AddControlPeriod(cardStatuses);
            fmCardStatusEdit.SetData(cardStatus);
            if (fmCardStatusEdit.ShowDialog() == DialogResult.OK)
            {
                cardStatus = fmCardStatusEdit.GetData();
                CardStatus findCardStatus = cardStatuses.FirstOrDefault(rec => rec.CardStatus_Id == cardStatus.CardStatus_Id);
                if (findCardStatus == null)
                {
                    MessageBox.Show("Не знайдений рядок для оновлення", "Помилка");
                    return;
                }
                findCardStatus.CardStatus_PerBeg = cardStatus.CardStatus_PerBeg;
                findCardStatus.CardStatus_PerEnd = cardStatus.CardStatus_PerEnd;
                findCardStatus.CardStatus_Type   = cardStatus.CardStatus_Type;
                RefreshTableCardStatus();
            }
        }
Esempio n. 17
0
 void ReturnToMyHand()
 {
     // move this back to the hand
     gm.myHand.CorrectCardPositions();
     mouseTargetable.SetTargetingGroup(TargetingGroup.CardInMyHandPlayable);
     status = CardStatus.InHand;
     sortingLayerManager.SetSortingLayer("CardInHand");
 }
Esempio n. 18
0
 public CardStatusWrapper
 (
     CardStatus value,
     string description
 )
 {
     Value       = value;
     Description = description;
 }
Esempio n. 19
0
    public void PutIn(TableGrid grid)
    {
        Deselect();
        status = CardStatus.Grid;

        NewHolder(grid);

        currentHand = null;
    }
Esempio n. 20
0
 public void Reset()
 {
     int width = this.Width;
     int height = this.Height;
     this.Width = height;
     this.Height = width;
     Image.RotateFlip(RotateFlipType.Rotate90FlipXY);
     this.status = CardStatus.Normal;
 }
Esempio n. 21
0
    public void GiveCardStatus(CardData card, string statusName, int statusNum)
    {
        CardStatus cs = StatusCreator.CreateCardStatus(statusName, statusNum);

        if (cs != null)
        {
            card.cardStatusControl.EnterStatus(cs);
        }
    }
Esempio n. 22
0
    public void PutIn(Discard discard)
    {
        Deselect();
        InitMove(discard.Position, discard.Rotation, 0.8f);
        status = CardStatus.DiscardPile;
        NewHolder(discard);
        cardCollider.enabled = false;

        currentHand = null;
    }
Esempio n. 23
0
 public async Task<TaskCard> UpdateStatus(long taskCardId, CardStatus status)
 {
     using (var db = new ApplicationDbContext())
     {
         var taskCard = db.Set<TaskCard>().First(x => x.TaskId == taskCardId);
         taskCard.Card.Status = status;
         await db.SaveChangesAsync();
         return taskCard;
     }
 }
Esempio n. 24
0
    public void Close()
    {
        if (FlipParticle)
        {
            FlipParticle.SetActive(false);
        }

        status = CardStatus.Closeing;
        setShadowActive(false);
    }
Esempio n. 25
0
    public void PutIn(Hand hand)
    {
        Deselect();
        InitMove(hand.transform.position, false);
        status = CardStatus.PlayerHand;
        NewHolder(hand);

        cardCollider.enabled = true;

        currentHand = hand;
    }
Esempio n. 26
0
    /// <summary>
    /// カードの初期情報を登録する
    /// </summary>
    /// <param name="id">カードのindex</param>
    /// <param name="pt">カードが持つパターン</param>
    public void InitCardData(int id, int pt)
    {
        cardId  = id;
        pattern = pt;

        cardStatus = CardStatus.Close;

        monsterPattern = Instantiate(MonsterPatternList[pattern], monsterPosition.transform.position, monsterPosition.transform.rotation, monsterPosition.transform);

        monsterPattern.SetActive(false);
    }
        }; // End CardStatus
        private void updateCardStatus(CardStatus currentStatus)
        {
            switch (currentStatus)
            {
            case CardStatus.NoCardInPrinter:
                lblStatus.Text = "Printer Empty";
                break;

            case CardStatus.CardFeeding:
                lblStatus.Text = "Card Feeding";
                break;

            case CardStatus.CardDockedOk:
                lblStatus.Text = "Card Docked";
                break;

            case CardStatus.CardConnecting:
                lblStatus.Text = "Card Connecting";
                break;

            case CardStatus.CardConnected:
                lblStatus.Text = "Card Connected";
                break;

            case CardStatus.CardDisconnecting:
                lblStatus.Text = "Card Disconnecting";
                break;

            case CardStatus.CardDisconnected:
                lblStatus.Text = "Card Disconnected";
                break;

            case CardStatus.CardEjecting:
                lblStatus.Text = "Card Ejecting";
                break;

            case CardStatus.CardHasError:
                lblStatus.Text = "Card Error";
                break;

            case CardStatus.CardFeedError:
                lblStatus.Text = "Card Feed Error";
                break;

            case CardStatus.CardPrinting:
                lblStatus.Text = "Card Printing";
                break;

            default:
                lblStatus.Text = "(Unknown)";
                break;
            }
            lblStatus.Refresh();
        } // End updateCardStatus
Esempio n. 28
0
        public static void DrawCard(int x, int y, ICard card, CardStatus cardStatus = CardStatus.Active)
        {
            string value        = card.Value.GetSymbol();
            string suit         = card.Suit.GetSymbol();
            string valuePadding = new string(' ', UIConstants.Card.Width - value.Length);
            string suitPadding  = new string(' ', (UIConstants.Card.Width - 1) / 2);

            var backgroundColor = cardStatus switch
            {
                CardStatus.Active => UIConstants.Card.Background.Active,
                CardStatus.Disabled => UIConstants.Card.Background.Disabled,
                CardStatus.Selected => UIConstants.Card.Background.Selected,
                _ => throw new ArgumentException("Invalid enum value"),
            };

            var foregroundColor = card.Suit == CardSuit.Diamonds || card.Suit == CardSuit.Hearts
                ? UIConstants.Card.Foreground.ActiveRed : UIConstants.Card.Foreground.ActiveBlack;

            if (cardStatus == CardStatus.Disabled)
            {
                foregroundColor = card.Suit == CardSuit.Diamonds || card.Suit == CardSuit.Hearts
                    ? UIConstants.Card.Foreground.DisabledRed : UIConstants.Card.Foreground.DisabledBlack;
            }

            Console.ForegroundColor = foregroundColor;
            Console.BackgroundColor = backgroundColor;

            int    endRow   = y + UIConstants.Card.Height;
            string emptyRow = new string(' ', UIConstants.Card.Width);

            for (int row = y; row < endRow; row++)
            {
                Console.SetCursorPosition(x, row);
                string rowToDraw = emptyRow;

                if (row == y)
                {
                    rowToDraw = $"{value}{valuePadding}";
                }
                else if (row == y + (UIConstants.Card.Height - 1) / 2)
                {
                    rowToDraw = $"{suitPadding}{suit}{suitPadding}";
                }
                else if (row == endRow - 1)
                {
                    rowToDraw = $"{valuePadding}{value}";
                }

                Console.WriteLine(rowToDraw);
            }

            Console.BackgroundColor = UIConstants.Field.BackgroundColor;
        }
Esempio n. 29
0
        public IActionResult GetCardsWithStatus(string channelName, CardStatus status)
        {
            if (status == 0)
            {
                return(BadRequest());
            }

            var channelId = this.channelService.GetChannelIdByName(channelName);
            var cards     = this.cardService.GetCardsWithStatus(channelId, status);

            return(Json(cards));
        }
Esempio n. 30
0
 public int[] GetBoxNumbers
 (
     CardStatus status
 )
 {
     return(Cards
            .Where(card => card.Status == status)
            .Select(card => card.BoxNumber)
            .Distinct()
            .OrderBy(number => number)
            .ToArray());
 }
Esempio n. 31
0
    public CardMoveInfo CreateCard(CardStatus card)
    {
        var newCard = Instantiate(CardPrefab);

        newCard.GetComponent <CardShowInfo>().CurrentCore = card;
        if (card.IsCardBack == false)
        {
            newCard.GetComponent <CardMoveInfo>().CardUseInfo = GwentMap.CardMap[card.CardId].CardUseInfo;
        }
        newCard.GetComponent <CardShowInfo>().SetCard();
        return(newCard.GetComponent <CardMoveInfo>());
    }
Esempio n. 32
0
 public void SetData(CardStatus status)
 {
     _id = status.CardStatus_Id;
     if (status.CardStatus_PerBeg != DateTime.MinValue)
     {
         tbPerBeg.Text = status.CardStatus_PerBeg.ToShortDateString();
     }
     if (status.CardStatus_PerEnd != DateTime.MinValue)
     {
         tbPerEnd.Text = status.CardStatus_PerEnd.ToShortDateString();
     }
     cbType.SelectedIndex = GetIndexCmType(status.CardStatus_Type);
 }
Esempio n. 33
0
        private async Task <ImageMessage> CreateImageMessageAsync(CardStatus cardStatus, int gameId, int cardId)
        {
            var cardUser = await _tableStorage.FindCardUserAsync(gameId, cardId);

            await UpdateImageNumberAsync(cardUser);

            var cardImage = new BingoCardImage((IList <CardCellStatus>)cardStatus.CardCells);
            var imageUri  = await _blobStorage.UploadImageAsync(cardImage.Image, cardStatus.CardId.ToString(), cardUser.ImageNumber + ".jpg");

            var previewUri = await _blobStorage.UploadImageAsync(cardImage.PreviewImage, cardStatus.CardId.ToString(), cardUser.ImageNumber + "_preview.jpg");

            return(new ImageMessage(imageUri.ToString(), previewUri.ToString()));
        }
Esempio n. 34
0
        public async Task <IActionResult> SendReview(string cardId, string decision, string channelName)
        {
            CardStatus status = decision switch
            {
                "approve" => CardStatus.Approved,
                "archive" => CardStatus.Archived,
                _ => CardStatus.Deleted
            };

            await this.cardService.ReviewCard(cardId, status);

            return(RedirectToAction("Index", new { channelName }));
        }
Esempio n. 35
0
 public GameManager()
 {
     cardstack = new CardStack ();
     cardStatus = new CardStatus ();
     CardAxisX = new float[12];
     CardAxisY = new float[2];
     CardExist = new bool[12,2];
     for(int i=0;i<12;i++)
         for(int j=0;j<2;j++)
             CardExist[i,j] = false;
     CardAxisY[0] = -3.75f;
     CardAxisY[1] = -5f;
     getCardAxisX ();
     turing = 0;
     takeCard = false;
 }
Esempio n. 36
0
 public void Tapping()
 {
     try
     {
         int width = this.Width;
         int height = this.Height;
         this.Width = height;
         this.Height = width;
         Image.RotateFlip(RotateFlipType.Rotate270FlipXY);
         this.status = CardStatus.Tapping;
     }
     catch (Exception ex)
     {
         //
     }
 }
Esempio n. 37
0
 void CardStatusChanged(object sender, EventArgs e)
 {
     Status = this.card.Status;
     RaisePropertyChanged(nameof(Status));
 }
 private void UpdateAvatar()
 {
     GameObject gameObject = this.shipCard.gameObject;
     if (this.Ship.IsOverMiddleBroken)
     {
         if (this.cardStatus != CardStatus.Broken)
         {
             GameObjectUtil.RemoveAllChildOf(gameObject);
             this.shipCard.SetShip(this.Ship.ship.picId, true);
             this.cardStatus = CardStatus.Broken;
         }
     }
     else if (this.cardStatus != CardStatus.Normal)
     {
         GameObjectUtil.RemoveAllChildOf(gameObject);
         this.shipCard.SetShip(this.Ship.ship.picId, false);
         this.cardStatus = CardStatus.Normal;
     }
     if (this.starSprite != null)
     {
         this.starSprite.SetSprite("shipColor" + this.Ship.ship.star);
     }
     if (this.colorSprite2 != null)
     {
         this.colorSprite2.SetSprite("colorTop" + this.Ship.ship.star);
     }
     if (this.typeSprite != null)
     {
         this.typeSprite.SetSprite("st_" + ((int) this.Ship.ship.type));
     }
 }
Esempio n. 39
0
 public static TaskCard WithStatus(this TaskCard taskCard, CardStatus status)
 {
     taskCard.Card.Status = status;
     return taskCard;
 }
Esempio n. 40
0
 public bool ContainsLowerCardThan(Card card, CardStatus status)
 {
     return this.cardHolder.AllCards[card.Suit].Any(c => c.Value == status && new Card(card.Suit, c.Key).GetValue() < card.GetValue());
 }
    public void triggerMoveUpDown()
    {
        float height = 0.3f;

        if (!_isAnimationProceeding)
        {
            _isAnimationProceeding = true;

            float y = transform.localPosition.y;
            switch (_cardStatus)
            {
                case CardStatus.CARD_UP:
                    y -= height;
                    _cardStatus = CardStatus.CARD_DOWN;
                    break;
                case CardStatus.CARD_DOWN:
                    y += height;
                    _cardStatus = CardStatus.CARD_UP;
                    break;
            }

            this.transform.DOLocalMoveY(y, 0.5f).
                SetEase(Ease.OutQuint).
                SetLoops(0).
                OnComplete(moveStop);
        }
    }