public DrawableCard ReturnTurnedDrawable(Hanafuda card) { Sprite2D back = GetBackImage(); back.Initialize(); return(new DrawableCard(Game, card, back)); }
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); }
private Sprite2D RetrieveFromGallery(Hanafuda card) { string idx = StringParseCardType(card.Month, card.Type); if (card is Pi) { idx += ((Pi)card).PiCount; } return(spriteGallery[idx]); }
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); }
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); }
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); }
public virtual int CalculatePoint(IHanafudaPlayer owner, Hanafuda card) { return(-1); }
public DrawableCard ReturnPairedDrawable(Hanafuda card) { Sprite2D front = RetrieveFromGallery(card); return(new DrawableCard(Game, card, front)); }