示例#1
0
        static void WriteQueryToFile()
        {
            CurveFlow.OutputQuery      query      = new CurveFlow.OutputQuery(CurveFlow.OutputQuery.GetDefaultXML());
            Dictionary <string, float> sampleMap1 = new Dictionary <string, float>
            {
                { "Parry", 0.715f },
                { "Dodge", 0.075f }
            };
            Dictionary <string, float> sampleMap2 = new Dictionary <string, float>
            {
                { "Parry", 0.152f },
                { "Dodge", 0.9124f }
            };
            Dictionary <string, float> weightMap = new Dictionary <string, float>
            {
                { "Parry", 2.3f },
                { "Dodge", 1.2f }
            };
            //query.InsertOutput(sampleMap1, weightMap, "ParryChallenge");
            //query.InsertOutput(sampleMap2, weightMap, "DodgeChallenge");
            string output = query.GetXmlString();

            Console.WriteLine(output);
            System.IO.File.WriteAllText("TestQueryFile.qf", output);
        }
示例#2
0
        static CurveFlow.OutputQuery LoadXmlQuery()
        {
            string xml = File.ReadAllText("..\\..\\..\\..\\FlowQuest\\FlowQuest\\Assets\\Resources\\QueryFiles\\DD2Tiles.xml");

            CurveFlow.OutputQuery xmlLoadTest = new CurveFlow.OutputQuery(xml);
            return(xmlLoadTest);
        }
示例#3
0
        static void LoadAndPrintXML()
        {
            string xml = File.ReadAllText("..\\..\\..\\..\\QueryFiles\\LoadAndSave.qf");

            CurveFlow.OutputQuery xmlLoadTest = new CurveFlow.OutputQuery(xml);
            Console.WriteLine(xmlLoadTest.GetXmlString());
        }
示例#4
0
        static void TestRepeatSelection()
        {
            string xml = File.ReadAllText("GroupQuery.qf");

            CurveFlow.OutputQuery xmlLoadTest = new CurveFlow.OutputQuery(xml);
            controller.Evaluate(xmlLoadTest, 0.0f);
            controller.Evaluate(xmlLoadTest, 0.0f);
            controller.Evaluate(xmlLoadTest, 0.0f);
            controller.Evaluate(xmlLoadTest, 0.0f);
        }
示例#5
0
        static void Main(string[] args)
        {
            controller = new CurveFlow.CurveFlowController();
            controller.InitializeLog(PrintToLog, (CurveFlow.MessageType) 0);

            /*
             *
             * Current Issue: No matter the difficulty, curveflow outputs the same result (and it somehow has the best delta)
             * What I've discoverd: When difficulty deltas start getting all very small, it causes the most extreme case to be chosen every time
             *
             */
            LoadProfile();
            Console.WriteLine("Start");
            System.Diagnostics.Stopwatch buildTimer = System.Diagnostics.Stopwatch.StartNew();
            CurveFlow.OutputQuery        query      = LoadXmlQuery();
            for (int j = 0; j < 386; j++)
            {
                controller.Evaluate(query, (float)j / 386);
            }
            buildTimer.Stop();
            Console.WriteLine(buildTimer.ElapsedMilliseconds);
        }