コード例 #1
0
    public int getRandomNumber(int start, int end)
    {
        if (!(stockedRandomValues.Count == 0))
        {
            int ret = stockedRandomValues[0];
            stockedRandomValues.RemoveAt(0);
            return(ret);
        }
        int rnd = HearthstoneBoard.getRandomNumberMain(start, end);

        recievedRandomValues.Add(rnd);
        return(rnd);
    }
コード例 #2
0
 public Card(int ID, string name, int attack, int hp, List <Effect> effects, bool poisonous, bool divineShield, bool taunt, Type type, int tier, string cardID)
 {
     this.ID      = ID == 0 ? ID = HearthstoneBoard.getRandomNumberMain(1, 9999) : ID;
     this.cardID  = cardID;
     this.name    = name;
     this.attack  = attack;
     this.hp      = hp;
     this.effects = effects;
     if (effects == null)
     {
         this.effects = new List <Effect>();
     }
     this.divineShield = divineShield;
     this.taunt        = taunt;
     this.type         = type;
     this.poisonous    = poisonous;
     this.tavernTier   = tier;
 }