Exemplo n.º 1
0
 public void addToDeck(SkillCardModel card)
 {
     if (isAcceptableType(card))
     {
         cards.Add(card);
     }
 }
Exemplo n.º 2
0
 private void init()
 {
     cards.AddRange(SkillCardModel.createSkillCards(type, 1, 8));
     cards.AddRange(SkillCardModel.createSkillCards(type, 2, 6));
     cards.AddRange(SkillCardModel.createSkillCards(type, 3, 4));
     cards.AddRange(SkillCardModel.createSkillCards(type, 4, 2));
     cards.AddRange(SkillCardModel.createSkillCards(type, 5, 1));
     shuffle();
 }
Exemplo n.º 3
0
 private int calcOrder(SkillCardModel other)
 {
     if (other.type > type || other.type == type && other.power > power)
     {
         return(-1);
     }
     else if (other.type == type && other.power == power)
     {
         return(0);
     }
     return(1);
 }
Exemplo n.º 4
0
 private bool isAcceptableType(SkillCardModel card)
 {
     return(type == Type.ALL || card.type == type);
 }
Exemplo n.º 5
0
 public void throwCard(SkillCardModel card)
 {
     usedCards.addToDeck(card);
 }
Exemplo n.º 6
0
 public void setView(SkillCardModel card)
 {
     setPower(card.power);
     setColor(card.type);
 }