Moved random graph values to test case, added null handling for graph values

This commit is contained in:
DrabWeb
2017-02-09 19:08:23 -04:00
parent ac6726ee2e
commit 843b58c8f4
3 changed files with 25 additions and 14 deletions

View File

@ -84,18 +84,7 @@ namespace osu.Game.Screens.Play
current?.Track?.Start();
}
}
};
// TODO: Remove
var random = new Random();
List<int> newValues = new List<int>();
for (int i = 0; i < 1000; i++)
{
newValues.Add(random.Next(1, 11));
}
DisplayValues(newValues);
};
}
}
}

View File

@ -72,6 +72,16 @@ namespace osu.Game.Screens.Play
{
calculatedValues.RemoveAll(delegate { return true; });
if (values == null)
{
for (float i = 0; i < ColumnCount; i++)
{
calculatedValues.Add(0);
}
return;
}
float step = (float)values.Count / (float)ColumnCount;
for (float i = 0; i < values.Count; i += step)