1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 19:32:55 +08:00

Privatise internals of TaikoColourDifficultyPreprocessor

This commit is contained in:
Dan Balasescu 2022-08-15 21:35:34 +09:00
parent 94c6beeaf7
commit 21d2998032
2 changed files with 18 additions and 18 deletions

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
/// <summary>
/// Utility class to perform various encodings.
/// </summary>
public class TaikoColourDifficultyPreprocessor
public static class TaikoColourDifficultyPreprocessor
{
/// <summary>
/// Processes and encodes a list of <see cref="TaikoDifficultyHitObject"/>s into a list of <see cref="TaikoDifficultyHitObjectColour"/>s,
@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
public static List<TaikoDifficultyHitObjectColour> ProcessAndAssign(List<DifficultyHitObject> hitObjects)
{
List<TaikoDifficultyHitObjectColour> colours = new List<TaikoDifficultyHitObjectColour>();
List<CoupledColourEncoding> encodings = Encode(hitObjects);
List<CoupledColourEncoding> encodings = encode(hitObjects);
// Assign indexing and encoding data to all relevant objects. Only the first note of each encoding type is
// assigned with the relevant encodings.
@ -52,10 +52,22 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
return colours;
}
/// <summary>
/// Encodes a list of <see cref="TaikoDifficultyHitObject"/>s into a list of <see cref="CoupledColourEncoding"/>s.
/// </summary>
private static List<CoupledColourEncoding> encode(List<DifficultyHitObject> data)
{
List<MonoEncoding> firstPass = encodeMono(data);
List<ColourEncoding> secondPass = encodeColour(firstPass);
List<CoupledColourEncoding> thirdPass = encodeCoupledColour(secondPass);
return thirdPass;
}
/// <summary>
/// Encodes a list of <see cref="TaikoDifficultyHitObject"/>s into a list of <see cref="MonoEncoding"/>s.
/// </summary>
public static List<MonoEncoding> EncodeMono(List<DifficultyHitObject> data)
private static List<MonoEncoding> encodeMono(List<DifficultyHitObject> data)
{
List<MonoEncoding> encodings = new List<MonoEncoding>();
MonoEncoding? currentEncoding = null;
@ -85,7 +97,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
/// <summary>
/// Encodes a list of <see cref="MonoEncoding"/>s into a list of <see cref="ColourEncoding"/>s.
/// </summary>
public static List<ColourEncoding> EncodeColour(List<MonoEncoding> data)
private static List<ColourEncoding> encodeColour(List<MonoEncoding> data)
{
List<ColourEncoding> encodings = new List<ColourEncoding>();
ColourEncoding? currentEncoding = null;
@ -110,7 +122,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
/// <summary>
/// Encodes a list of <see cref="ColourEncoding"/>s into a list of <see cref="CoupledColourEncoding"/>s.
/// </summary>
public static List<CoupledColourEncoding> EncodeCoupledColour(List<ColourEncoding> data)
private static List<CoupledColourEncoding> encodeCoupledColour(List<ColourEncoding> data)
{
List<CoupledColourEncoding> encodings = new List<CoupledColourEncoding>();
CoupledColourEncoding? currentEncoding = null;
@ -156,17 +168,5 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
return encodings;
}
/// <summary>
/// Encodes a list of <see cref="TaikoDifficultyHitObject"/>s into a list of <see cref="CoupledColourEncoding"/>s.
/// </summary>
public static List<CoupledColourEncoding> Encode(List<DifficultyHitObject> data)
{
List<MonoEncoding> firstPass = EncodeMono(data);
List<ColourEncoding> secondPass = EncodeColour(firstPass);
List<CoupledColourEncoding> thirdPass = EncodeCoupledColour(secondPass);
return thirdPass;
}
}
}

View File

@ -7,7 +7,7 @@ using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour;
namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing
{
public class TaikoDifficultyPreprocessor
public static class TaikoDifficultyPreprocessor
{
/// <summary>
/// Does preprocessing on a list of <see cref="TaikoDifficultyHitObject"/>s.