Esempio n. 1
0
        public DrawableCard ReturnTurnedDrawable(Hanafuda card)
        {
            Sprite2D back = GetBackImage();

            back.Initialize();
            return(new DrawableCard(Game, card, back));
        }
Esempio n. 2
0
        public void PiEquals()
        {
            hanafuda = new Pi(Month.April, 1);
            Hanafuda toCompare = new SsangPi(Month.April);

            Assert.AreEqual(false, hanafuda == toCompare);
            toCompare = new Pi(Month.April, 1);
            Assert.AreEqual(true, hanafuda == toCompare);
        }
Esempio n. 3
0
        private Sprite2D RetrieveFromGallery(Hanafuda card)
        {
            string idx = StringParseCardType(card.Month, card.Type);

            if (card is Pi)
            {
                idx += ((Pi)card).PiCount;
            }
            return(spriteGallery[idx]);
        }
Esempio n. 4
0
        public void TtiEquals()
        {
            hanafuda = new HongDan(Month.April);
            //same month wrong dan
            Hanafuda toCompare = new ChungDan(Month.April);

            Assert.AreEqual(false, hanafuda == toCompare);
            //same card
            toCompare = new HongDan(Month.April);
            Assert.AreEqual(true, hanafuda == toCompare);
        }
Esempio n. 5
0
        public void KwangEquals()
        {
            //initialization for test
            hanafuda = new Kwang(Month.April);
            Hanafuda toCompare = new Kwang(Month.April);

            //true test
            Assert.AreEqual(true, hanafuda == toCompare);
            //false test
            Assert.AreEqual(false, hanafuda != toCompare);
        }
Esempio n. 6
0
        public override int CalculatePoint(IHanafudaPlayer owner, Hanafuda card)
        {
            CardType type          = card.Type;
            int      calculatedPnt = 0;

            if (type == CardType.Tti)
            {
                calculatedPnt = 5;
            }
            if (type == CardType.Yul)
            {
                calculatedPnt = 10;
            }
            if (type == CardType.Kwang)
            {
                calculatedPnt = 20;
            }
            return(calculatedPnt);
        }
Esempio n. 7
0
 public virtual int CalculatePoint(IHanafudaPlayer owner, Hanafuda card)
 {
     return(-1);
 }
Esempio n. 8
0
        public DrawableCard ReturnPairedDrawable(Hanafuda card)
        {
            Sprite2D front = RetrieveFromGallery(card);

            return(new DrawableCard(Game, card, front));
        }