示例#1
0
        public void PokemonGenerationReturnsLegalPokemon(int species)
        {
            int count = 0;
            var tr    = new SimpleTrainerInfo(GameVersion.SN);

            var pk = new PK7 {
                Species = species
            };

            pk.Gender = pk.GetSaneGender();
            var ez = EncounterMovesetGenerator.GeneratePKMs(pk, tr);

            foreach (var e in ez)
            {
                var la = new LegalityAnalysis(e);
                la.Valid.Should().BeTrue($"Because generated Pokemon {count} for {species:000} should be valid");
                Assert.True(la.Valid);
                count++;
            }
        }
示例#2
0
        //[TestMethod]
        //[TestCategory(SimulatorParse)]
        public void TestGenerate()
        {
            int count = 0;
            var tr    = new SimpleTrainerInfo();

            for (int i = 1; i <= 807; i++)
            {
                var pk = new PK7 {
                    Species = i
                };
                pk.Gender = pk.GetSaneGender();
                var ez = EncounterMovesetGenerator.GeneratePKMs(pk, tr);
                Debug.WriteLine($"Starting {i:000}");
                foreach (var e in ez)
                {
                    var la = new LegalityAnalysis(e);
                    Assert.IsTrue(la.Valid);
                    count++;
                }
                Debug.WriteLine($"Finished {i:000}");
            }
            Debug.WriteLine($"Generated {count} PKMs!");
        }