1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 23:07:26 +08:00

Improve test case a little bit.

This commit is contained in:
smoogipooo 2017-09-11 13:55:34 +09:00
parent 3026675f35
commit 9e3206fef3

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Extensions.IEnumerableExtensions;
@ -32,6 +33,8 @@ namespace osu.Desktop.Tests.Visual
public TestCaseManiaPlayfield()
{
var rng = new Random(1337);
AddStep("1 column", () => createPlayfield(1, SpecialColumnPosition.Normal));
AddStep("4 columns", () => createPlayfield(4, SpecialColumnPosition.Normal));
AddStep("Left special style", () => createPlayfield(4, SpecialColumnPosition.Left));
@ -51,10 +54,12 @@ namespace osu.Desktop.Tests.Visual
{
var playfield = createPlayfield(4, SpecialColumnPosition.Normal);
var note = new DrawableNote(new Note(), ManiaAction.Key1)
int col = rng.Next(0, 4);
var note = new DrawableNote(new Note { Column = col }, ManiaAction.Key1)
{
Judgement = new ManiaJudgement { Result = HitResult.Hit },
AccentColour = Color4.Green
AccentColour = playfield.Columns.ElementAt(col).AccentColour
};
playfield.OnJudgement(note);