mirror of
https://github.com/ppy/osu-tools.git
synced 2025-06-07 23:07:01 +09:00
32 lines
918 B
C#
32 lines
918 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using System;
|
|
using osu.Game.Rulesets;
|
|
using osu.Game.Rulesets.Catch;
|
|
using osu.Game.Rulesets.Mania;
|
|
using osu.Game.Rulesets.Osu;
|
|
using osu.Game.Rulesets.Taiko;
|
|
|
|
namespace PerformanceCalculator
|
|
{
|
|
public static class LegacyHelper
|
|
{
|
|
public static Ruleset GetRulesetFromLegacyID(int id)
|
|
{
|
|
switch (id)
|
|
{
|
|
default:
|
|
throw new ArgumentException("Invalid ruleset ID provided.");
|
|
case 0:
|
|
return new OsuRuleset();
|
|
case 1:
|
|
return new TaikoRuleset();
|
|
case 2:
|
|
return new CatchRuleset();
|
|
case 3:
|
|
return new ManiaRuleset();
|
|
}
|
|
}
|
|
}
|
|
}
|