mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 12:58:01 +09:00
Cleanups
This commit is contained in:
parent
a5888feca4
commit
991d85a9f3
@ -4,7 +4,6 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.Cursor;
|
using osu.Game.Graphics.Cursor;
|
||||||
using osu.Game.Tests.Visual;
|
using osu.Game.Tests.Visual;
|
||||||
@ -18,9 +17,6 @@ namespace osu.Game.Tournament.Tests
|
|||||||
[Cached]
|
[Cached]
|
||||||
private readonly LadderManager manager;
|
private readonly LadderManager manager;
|
||||||
|
|
||||||
[Cached]
|
|
||||||
private Bindable<TournamentConditions> conditions = new Bindable<TournamentConditions>(new TournamentConditions());
|
|
||||||
|
|
||||||
public TestCaseLadderManager()
|
public TestCaseLadderManager()
|
||||||
{
|
{
|
||||||
var ladder = File.Exists(@"bracket.json") ? JsonConvert.DeserializeObject<LadderInfo>(File.ReadAllText(@"bracket.json")) : new LadderInfo();
|
var ladder = File.Exists(@"bracket.json") ? JsonConvert.DeserializeObject<LadderInfo>(File.ReadAllText(@"bracket.json")) : new LadderInfo();
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Configuration;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Tests.Visual;
|
using osu.Game.Tests.Visual;
|
||||||
@ -23,9 +21,6 @@ namespace osu.Game.Tournament.Tests
|
|||||||
typeof(DrawableTournamentTeam),
|
typeof(DrawableTournamentTeam),
|
||||||
};
|
};
|
||||||
|
|
||||||
[Cached]
|
|
||||||
private Bindable<TournamentConditions> conditions = new Bindable<TournamentConditions>(new TournamentConditions());
|
|
||||||
|
|
||||||
public TestCaseMatchPairings()
|
public TestCaseMatchPairings()
|
||||||
{
|
{
|
||||||
Container<DrawableMatchPairing> level1;
|
Container<DrawableMatchPairing> level1;
|
||||||
|
@ -19,7 +19,6 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
{
|
{
|
||||||
public readonly MatchPairing Pairing;
|
public readonly MatchPairing Pairing;
|
||||||
private readonly FillFlowContainer<DrawableMatchTeam> flow;
|
private readonly FillFlowContainer<DrawableMatchTeam> flow;
|
||||||
private readonly Bindable<TournamentConditions> conditions = new Bindable<TournamentConditions>();
|
|
||||||
private readonly Drawable selectionBox;
|
private readonly Drawable selectionBox;
|
||||||
private Bindable<MatchPairing> globalSelection;
|
private Bindable<MatchPairing> globalSelection;
|
||||||
|
|
||||||
@ -70,15 +69,6 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
updateTeams();
|
updateTeams();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
|
||||||
private void load(Bindable<TournamentConditions> conditions)
|
|
||||||
{
|
|
||||||
this.conditions.BindValueChanged(_ => updateWinConditions());
|
|
||||||
|
|
||||||
if (conditions != null)
|
|
||||||
this.conditions.BindTo(conditions);
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool selected;
|
private bool selected;
|
||||||
|
|
||||||
public bool Selected
|
public bool Selected
|
||||||
@ -123,7 +113,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
|
|
||||||
private void updateWinConditions()
|
private void updateWinConditions()
|
||||||
{
|
{
|
||||||
if (conditions.Value == null || Pairing.Grouping.Value == null) return;
|
if (Pairing.Grouping.Value == null) return;
|
||||||
|
|
||||||
var instaWinAmount = Pairing.Grouping.Value.BestOf / 2;
|
var instaWinAmount = Pairing.Grouping.Value.BestOf / 2;
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
|
@ -85,32 +85,6 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
LabelText = "Losers Bracket",
|
LabelText = "Losers Bracket",
|
||||||
Bindable = new Bindable<bool>()
|
Bindable = new Bindable<bool>()
|
||||||
}
|
}
|
||||||
// new Container
|
|
||||||
// {
|
|
||||||
// RelativeSizeAxes = Axes.X,
|
|
||||||
// AutoSizeAxes = Axes.Y,
|
|
||||||
// Padding = new MarginPadding { Horizontal = padding },
|
|
||||||
// Children = new Drawable[]
|
|
||||||
// {
|
|
||||||
// new OsuSpriteText
|
|
||||||
// {
|
|
||||||
// Anchor = Anchor.CentreLeft,
|
|
||||||
// Origin = Anchor.CentreLeft,
|
|
||||||
// Text = "Best of",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// sliderBestOf = new PlayerSliderBar<double>
|
|
||||||
// {
|
|
||||||
// Bindable = new BindableDouble
|
|
||||||
// {
|
|
||||||
// Default = 11,
|
|
||||||
// Value = 11,
|
|
||||||
// MinValue = 1,
|
|
||||||
// MaxValue = 21,
|
|
||||||
// Precision = 1,
|
|
||||||
// },
|
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
editorInfo.Selected.ValueChanged += selection =>
|
editorInfo.Selected.ValueChanged += selection =>
|
@ -1,3 +1,6 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Lines;
|
using osu.Framework.Graphics.Lines;
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
namespace osu.Game.Tournament.Screens.Ladder.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Conditions governing a tournament.
|
|
||||||
/// </summary>
|
|
||||||
public class TournamentConditions
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +1,6 @@
|
|||||||
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user