private void testOsuMods(OsuRuleset ruleset)
        {
            var easierMods = ruleset.GetModsFor(ModType.DifficultyReduction);
            var harderMods = ruleset.GetModsFor(ModType.DifficultyIncrease);
            var assistMods = ruleset.GetModsFor(ModType.Special);

            var noFailMod = easierMods.FirstOrDefault(m => m is OsuModNoFail);
            var hiddenMod = harderMods.FirstOrDefault(m => m is OsuModHidden);

            var doubleTimeMod = harderMods.OfType <MultiMod>().FirstOrDefault(m => m.Mods.Any(a => a is OsuModDoubleTime));

            var autoPilotMod = assistMods.FirstOrDefault(m => m is OsuModAutopilot);

            var easy     = easierMods.FirstOrDefault(m => m is OsuModEasy);
            var hardRock = harderMods.FirstOrDefault(m => m is OsuModHardRock);

            testSingleMod(noFailMod);
            testMultiMod(doubleTimeMod);
            testIncompatibleMods(easy, hardRock);
            testDeselectAll(easierMods.Where(m => !(m is MultiMod)));
            testMultiplierTextColour(noFailMod, modSelect.LowMultiplierColour);
            testMultiplierTextColour(hiddenMod, modSelect.HighMultiplierColour);

            testUnimplmentedMod(autoPilotMod);
        }
Exemplo n.º 2
0
        public void TestOsuMods()
        {
            changeRuleset(0);

            var osu = new OsuRuleset();

            var easierMods     = osu.GetModsFor(ModType.DifficultyReduction);
            var harderMods     = osu.GetModsFor(ModType.DifficultyIncrease);
            var conversionMods = osu.GetModsFor(ModType.Conversion);

            var noFailMod = osu.GetModsFor(ModType.DifficultyReduction).FirstOrDefault(m => m is OsuModNoFail);
            var hiddenMod = harderMods.FirstOrDefault(m => m is OsuModHidden);

            var doubleTimeMod = harderMods.OfType <MultiMod>().FirstOrDefault(m => m.Mods.Any(a => a is OsuModDoubleTime));

            var targetMod = conversionMods.FirstOrDefault(m => m is OsuModTarget);

            var easy     = easierMods.FirstOrDefault(m => m is OsuModEasy);
            var hardRock = harderMods.FirstOrDefault(m => m is OsuModHardRock);

            testSingleMod(noFailMod);
            testMultiMod(doubleTimeMod);
            testIncompatibleMods(easy, hardRock);
            testDeselectAll(easierMods.Where(m => !(m is MultiMod)));
            testMultiplierTextColour(noFailMod, () => modSelect.LowMultiplierColour);
            testMultiplierTextColour(hiddenMod, () => modSelect.HighMultiplierColour);

            testUnimplementedMod(targetMod);
        }
Exemplo n.º 3
0
        public void TestOsuMods()
        {
            changeRuleset(0);

            var osu = new OsuRuleset();

            var easierMods = osu.GetModsFor(ModType.DifficultyReduction);
            var harderMods = osu.GetModsFor(ModType.DifficultyIncrease);

            var noFailMod = osu.GetModsFor(ModType.DifficultyReduction).FirstOrDefault(m => m is OsuModNoFail);

            var doubleTimeMod = harderMods.OfType <MultiMod>().FirstOrDefault(m => m.Mods.Any(a => a is OsuModDoubleTime));

            var easy     = easierMods.FirstOrDefault(m => m is OsuModEasy);
            var hardRock = harderMods.FirstOrDefault(m => m is OsuModHardRock);

            testSingleMod(noFailMod);
            testMultiMod(doubleTimeMod);
            testIncompatibleMods(easy, hardRock);
            testDeselectAll(easierMods.Where(m => !(m is MultiMod)));
        }