Пример #1
0
        private static BombRules Initialize(int seed)
        {
            DebugLog("Generating Rules for seed {0}", seed);

            var bombRules = new BombRules
            {
                ManualMetaData = new ManualMetaData
                {
                    BombClassification = ManualMetaData.BOMB_CLASSIFICATION,
                    LockCode           = ManualMetaData.LOCK_CODE
                },
                WireRuleSet         = WireRuleSetGenerator.CreateWireRules(seed),
                WhosOnFirstRuleSet  = (WhosOnFirstRuleSet)WhosOnFirstRuleSetGenerator.GenerateRuleSet(seed),
                MemoryRuleSet       = (MemoryRuleSet)MemoryRuleSetGenerator.GenerateRuleSet(seed),
                KeypadRuleSet       = (KeypadRuleSet)KeypadRuleSetGenerator.GenerateRuleSet(seed),
                NeedyKnobRuleSet    = (NeedyKnobRuleSet)NeedyKnobRuleSetGenerator.GenerateRuleSet(seed),
                ButtonRuleSet       = ButtonRuleSetGenerator.GenerateButtonRules(seed),
                WireSequenceRuleSet = (WireSequenceRuleSet)WireSequenceRuleSetGenerator.GenerateRuleSet(seed),
                PasswordRuleSet     = PasswordRuleSetGenerator.GeneratePasswordRules(seed),
                MorseCodeRuleSet    = MorseCodeRuleSetGenerator.GenerateMorseCodeRuleSet(seed),
                VennWireRuleSet     = VennWireRuleSetGenerator.GenerateVennWireRules(seed),
                RhythmHeavenRuleSet = (RhythmHeavenRuleSet)RhythmHeavenRuleSetGenerator.GenerateRuleSet(seed),
                MazeRuleSet         = (MazeRuleSet)MazeRuleSetGenerator.GenerateRuleSet(seed),
                SimonRuleSet        = SimonRuleSetGenerator.GenerateSimonRuleSet(seed)
            };

            ModRuleSetGenerator.Instance.CreateRules(seed);

            bombRules.PrintRules();
            bombRules.CacheStringValues();

            DebugLog("Done Generating Rules for seed {0}", seed);

            return(bombRules);
        }
Пример #2
0
        public BombRules GenerateBombRules(int seed)
        {
            BombRules bombRules = new BombRules
            {
                WireRuleSet         = (WireRuleSet)WireRuleSetGenerator.CreateWireRules(seed),
                WhosOnFirstRuleSet  = (WhosOnFirstRuleSet)WhosOnFirstRuleSetGenerator.GenerateRuleSet(seed),
                MemoryRuleSet       = (MemoryRuleSet)MemoryRuleSetGenerator.GenerateRuleSet(seed),
                KeypadRuleSet       = (KeypadRuleSet)KeypadRuleSetGenerator.GenerateRuleSet(seed),
                NeedyKnobRuleSet    = (NeedyKnobRuleSet)NeedyKnobRuleSetGenerator.GenerateRuleSet(seed),
                ButtonRuleSet       = (ButtonRuleSet)ButtonRuleSetGenerator.GenerateButtonRules(seed),
                WireSequenceRuleSet = (WireSequenceRuleSet)WireSequenceRuleSetGenerator.GenerateRuleSet(seed),
                PasswordRuleSet     = (PasswordRuleSet)PasswordRuleSetGenerator.GeneratePasswordRules(seed),
                MorseCodeRuleSet    = (MorseCodeRuleSet)MorseCodeRuleSetGenerater.GenerateRuleSet(seed),
                VennWireRuleSet     = (VennWireRuleSet)VennWireRuleSetGenerator.GenerateVennWireRules(seed),
                MazeRuleSet         = (MazeRuleSet)MazeRuleSetGenerator.GenerateRuleSet(seed),
                SimonRuleSet        = (SimonRuleSet)SimonRuleSetGenerator.GenerateSimonRuleSet(seed)
            };

            bombRules.CacheStringValues();
            bombRules.PrintRules();
            return(bombRules);
        }