public void TestFever()
        {
            var wheel = new VGame.CLR.Wheel();
            var ir = new VGame.CLR.Input
            {
                Switch = 1,
                RunTime = 1,
                GameRate = 1,
                MaxBet = 10,
                MinBet = 1,
                Bet = 9,
                GameUndulate = 8,
                Line = 7,
                RecCycle = 6,
                WupCondi1 = 1,
                WupCondi2 = 1,
                WupRate = 1,
                Free = 0,
                Fever = 1,
                WinSet = 0
            };

            var result = wheel.Spin(ir);

            Assert.AreEqual(15, result.Reels.Length);
        }
        public void TestDump()
        {
            var wheel = new VGame.CLR.Wheel();
            var ir = new VGame.CLR.Input
            {
                Switch = 1,
                RunTime = 1,
                GameRate = 1,
                MaxBet = 10,
                MinBet = 1,
                Bet = 9,
                GameUndulate = 8,
                Line = 7,
                RecCycle = 6,
                WupCondi1 = 1,
                WupCondi2 = 1,
                WupRate = 1,
                Free = 0,
                Fever = 0,
                WinSet = 1
            };

            wheel.Spin(ir);
            var data = wheel.Export();
            data.Reel.stcReelFeverData[0].uwGetIndex = 12345;

            wheel.Import(ref data);

            var data2 = wheel.Export();

            Assert.AreEqual(12345, data2.Reel.stcReelFeverData[0].uwGetIndex);
        }
        private static void _Spin(Regulus.Utility.Console.IViewer view, VGame.CLR.Wheel wheel)
        {
            var ir = new VGame.CLR.Input
            {
                Switch = 1,
                RunTime = 1,
                GameRate = 1,
                MaxBet = 10,
                MinBet = 1,
                Bet = 9,
                GameUndulate = 8,
                Line = 7,
                RecCycle = 6,
                WupCondi1 = 1,
                WupCondi2 = 1,
                WupRate = 1,
                Free = 0,
                Fever = 0,
                WinSet = 1
            };
            view.WriteLine("嘗試讀取Input.txt...");
            if(System.IO.File.Exists("Input.txt"))
            {
                view.WriteLine("成功.");
                var readed = System.IO.File.ReadAllText("Input.txt");
                ir = Newtonsoft.Json.JsonConvert.DeserializeObject<VGame.CLR.Input>(readed);
            }
            else
            {
                view.WriteLine("失敗.");
                view.WriteLine("建立預設Input.txt ...");

                System.IO.File.WriteAllText("Input.txt", Newtonsoft.Json.JsonConvert.SerializeObject(ir));
            }

            var output = wheel.Spin(ir);

            var guid = System.Guid.NewGuid();
            var inputPath = $"Input{guid}.txt";
            view.WriteLine(inputPath);
            System.IO.File.WriteAllText(inputPath , Newtonsoft.Json.JsonConvert.SerializeObject(ir));

            var outputPath = $"Output{guid}.txt";
            view.WriteLine(outputPath);
            System.IO.File.WriteAllText(outputPath, Newtonsoft.Json.JsonConvert.SerializeObject(output));
        }