2019-09-02 04:25:39 +00:00
|
|
|
// 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.Linq;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Tests
|
|
|
|
{
|
2020-04-17 07:32:12 +00:00
|
|
|
public class TestSceneSwellJudgements : TestSceneTaikoPlayer
|
2019-09-02 04:25:39 +00:00
|
|
|
{
|
|
|
|
[Test]
|
|
|
|
public void TestZeroTickTimeOffsets()
|
|
|
|
{
|
2020-04-19 02:36:04 +00:00
|
|
|
AddUntilStep("gameplay finished", () => Player.ScoreProcessor.HasCompleted.Value);
|
2020-02-23 04:01:30 +00:00
|
|
|
AddAssert("all tick offsets are 0", () => Player.Results.Where(r => r.HitObject is SwellTick).All(r => r.TimeOffset == 0));
|
2019-09-02 04:25:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected override bool Autoplay => true;
|
|
|
|
|
|
|
|
protected override IBeatmap CreateBeatmap(RulesetInfo ruleset)
|
|
|
|
{
|
|
|
|
var beatmap = new Beatmap<TaikoHitObject>
|
|
|
|
{
|
|
|
|
BeatmapInfo = { Ruleset = new TaikoRuleset().RulesetInfo },
|
|
|
|
HitObjects =
|
|
|
|
{
|
|
|
|
new Swell
|
|
|
|
{
|
|
|
|
StartTime = 1000,
|
|
|
|
Duration = 1000,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
return beatmap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|