Esempio n. 1
0
        public WiresHandler(
            BombSettings settings
        )
            : base("Wires")
        {
            this.settings = settings;

            this.solver = new WiresSolver();
        }
Esempio n. 2
0
        public void Complete()
        {
            var solver = new WiresSolver();
            var originalSolver = new OriginalWiresSolver();

            var settings = new BombSettings();
            var permutations = this.GetAllColorPermutations();
            foreach (var p in permutations)
            {
                settings.SerialLastDigit = Parity.Even;

                Assert.AreEqual(
                    originalSolver.Invoke(settings, p),
                    solver.Invoke(settings, p)
                );

                settings.SerialLastDigit = Parity.Odd;

                Assert.AreEqual(
                    originalSolver.Invoke(settings, p),
                    solver.Invoke(settings, p)
                );
            }
        }