private bool checkScienceTypeOfTower(int typeId, ScienceType userScienceType)
        {
            Type root = null;

            switch (userScienceType)
            {
            case ScienceType.PHYS:
                root = typeof(PhysicsTower);
                break;

            case ScienceType.CHEM:
                root = typeof(ChemistryTower);
                break;

            case ScienceType.BIO:
                root = typeof(BiologyTower);
                break;
            }

            Type      type = TypeIdGenerator.getTowerType(typeId);
            TowerNode node = TypeIdGenerator.getTowerNodeInst(type);

            if (node.towerType != root && node.getRoot().towerType == root)
            {
                return(true);
            }

            return(false);
        }
 public ScienceCard(
     Card card,
     ScienceType scienceType
     ) : base(card)
 {
     this.ScienceCardType = scienceType;
 }
        private bool checkScienceTypeOfTower(int typeId, ScienceType userScienceType)
        {
            Type root = null;

            switch (userScienceType)
            {
                case ScienceType.PHYS:
                    root = typeof(PhysicsTower);
                    break;
                case ScienceType.CHEM:
                    root = typeof(ChemistryTower);
                    break;
                case ScienceType.BIO:
                    root = typeof(BiologyTower);
                    break;
            }

            Type type = TypeIdGenerator.getTowerType(typeId);
            TowerNode node = TypeIdGenerator.getTowerNodeInst(type);

            if (node.towerType != root && node.getRoot().towerType == root)
                return true;

            return false;
        }
Example #4
0
 public ScienceCard(
     Guid id,
     Age age,
     string title,
     string description,
     uint minimumNumberOfPlayers,
     ScienceType scienceType,
     RawMaterialResourceCost rawMaterialResourceCost,
     ManufacturedMaterialResourceCost manufacturedMaterialResourceCost,
     IEnumerable <Guid> baseCardId,
     IEnumerable <Guid> derivedCardIds)
     : base(id, age, title, description, minimumNumberOfPlayers, 0, rawMaterialResourceCost, manufacturedMaterialResourceCost, baseCardId, derivedCardIds)
 {
     this.ScienceType = scienceType;
 }
Example #5
0
 public GuildRewardScienceCard(
     Guid id,
     Age age,
     string title,
     string description,
     uint minimumNumberOfPlayers,
     ScienceType scienceRewardType,
     ApplicableDirection usabilityDirection,
     RawMaterialResourceCost rawMaterialResourceCost,
     ManufacturedMaterialResourceCost manufacturedMaterialResourceCost,
     IEnumerable <Guid> baseCardId,
     IEnumerable <Guid> derivedCardIds)
     : base(id, age, title, description, minimumNumberOfPlayers, usabilityDirection, rawMaterialResourceCost, manufacturedMaterialResourceCost, baseCardId, derivedCardIds)
 {
     this.ScienceRewardType = scienceRewardType;
 }