private bool RunSimpleTestSingleHeroGroup()
        {
            MonsterMatcher matcher   = new MonsterMatcher(1, new Random(DateTime.Now.Millisecond));
            IEntityManager entityMgr = (IEntityManager)matcher;

            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Hero), new EntityRating(1)));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(1)));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(2)));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(4)));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(8)));

            var heroList = new List <IEntityTemplate>()
            {
                new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Hero), new EntityRating(2)),
                new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Hero), new EntityRating(3)),
                new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Hero), new EntityRating(4))
            };
            var heroGroup = new EntiyGroupTemplate(heroList);

            IEnemyGroupMaker   maker = (IEnemyGroupMaker)matcher;
            EntiyGroupTemplate mob   = new EntiyGroupTemplate(maker.MakeEnemyGroup(heroGroup));

            int mobRating     = mob.GetThreat(heroGroup);
            int heroRatingMax = heroGroup.GetThreat(mob) + 1;

            return(mobRating <= heroRatingMax);
        }
        private bool RunSimpleTestSingleMajorHero()
        {
            TraitManager traitManager = CreateTraitManager();
            ITrait       fire         = traitManager.GetTraitByName("fire");
            ITrait       water        = traitManager.GetTraitByName("water");
            ITrait       earth        = traitManager.GetTraitByName("earth");
            ITrait       air          = traitManager.GetTraitByName("air");

            MonsterMatcher matcher = new MonsterMatcher(2, new Random(1), traitManager);

            IEntityManager entityMgr = (IEntityManager)matcher;

            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Hero), new EntityRating(1, new List <ITrait>()
            {
            })));

            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(1, new List <ITrait>()
            {
                water, fire
            })));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(2, new List <ITrait>()
            {
                air
            })));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(3, new List <ITrait>()
            {
                water
            })));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(4, new List <ITrait>()
            {
                fire
            })));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(5, new List <ITrait>()
            {
                earth, fire
            })));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(6, new List <ITrait>()
            {
                water, water
            })));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(7, new List <ITrait>()
            {
                air, fire
            })));

            var hero = new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Hero), new EntityRating(10, new List <ITrait>()
            {
                water
            }));

            IEnemyGroupMaker maker = (IEnemyGroupMaker)matcher;
            var group = maker.MakeEnemyGroup(hero);

            return(group.Count > 0);
        }
        //
        // tests
        //
        private bool RunSimpleTestSingleHero()
        {
            MonsterMatcher matcher   = new MonsterMatcher(1, new Random(DateTime.Now.Millisecond));
            IEntityManager entityMgr = (IEntityManager)matcher;

            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Hero), new EntityRating(1)));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(1)));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(2)));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(4)));
            entityMgr.Add(new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Monster), new EntityRating(8)));

            var hero = new EntityTemplate(new EntityFaction(EntityFaction.FactionKind.Hero), new EntityRating(2));

            IEnemyGroupMaker maker = (IEnemyGroupMaker)matcher;
            var group = maker.MakeEnemyGroup(hero);

            return(group.Count > 0);
        }