Ejemplo n.º 1
0
        public void getCardInfo(int cid)
        {
            int    jump = 0, move = 0, collect = 0, pay = 0, id = 0;
            string payto = "", collectFrom = "", text = "", type = "";

            _gameCards = ThemeParser.Getcard();

            foreach (GameCard gcard in _gameCards.Values)
            {
                if (gcard.Id == cid)
                {
                    id          = gcard.Id;
                    jump        = gcard.Jump;
                    move        = gcard.Move;
                    collect     = gcard.Collect;
                    pay         = gcard.Pay;
                    payto       = gcard.PayTo;
                    collectFrom = gcard.CollectFrom;
                    text        = gcard.Text;
                    type        = gcard.Type;
                    break;
                }
            }
            printText(text);
            if (jump != 0)
            {
                jumpTo(jump);
            }
            else if (move != 0)
            {
                movePlayer(move);
            }
            else if (collect != 0)
            {
                if (collectFrom == "bank")
                {
                    collectMoney(collect);
                }
                else if (collectFrom == "player")
                {
                    collectplayer(collect);
                }
            }
            else if (pay != 0)
            {
            }
        }