Update with pattern changes.

This commit is contained in:
smoogipooo 2017-05-22 10:34:12 +09:00
parent 7d417e4219
commit 8077ddf944
1 changed files with 5 additions and 5 deletions

View File

@ -95,7 +95,7 @@ public override Pattern Generate()
var pattern = new Pattern();
for (int i = RandomStart; i < AvailableColumns; i++)
if (PreviousPattern.IsFilled(i))
if (PreviousPattern.ColumnHasObject(i))
addToPattern(pattern, RandomStart + AvailableColumns - i - 1);
return pattern;
@ -122,7 +122,7 @@ public override Pattern Generate()
var pattern = new Pattern();
for (int i = RandomStart; i < AvailableColumns; i++)
if (PreviousPattern.IsFilled(i))
if (PreviousPattern.ColumnHasObject(i))
addToPattern(pattern, i);
return pattern;
@ -212,12 +212,12 @@ private Pattern generateRandomNotes(int noteCount)
bool allowStacking = (convertType & PatternType.ForceNotStack) == 0;
if (!allowStacking)
noteCount = Math.Min(noteCount, AvailableColumns - RandomStart - PreviousPattern.ColumnsFilled);
noteCount = Math.Min(noteCount, AvailableColumns - RandomStart - PreviousPattern.ColumnWithObjects);
int nextColumn = GetColumn((HitObject as IHasXPosition)?.X ?? 0, true);
for (int i = 0; i < noteCount; i++)
{
while (pattern.IsFilled(nextColumn) || (PreviousPattern.IsFilled(nextColumn) && !allowStacking))
while (pattern.ColumnHasObject(nextColumn) || (PreviousPattern.ColumnHasObject(nextColumn) && !allowStacking))
{
if ((convertType & PatternType.Gathered) > 0)
{
@ -278,7 +278,7 @@ private Pattern generateRandomPatternWithMirrored(double centreProbability, doub
int nextColumn = Random.Next(RandomStart, columnLimit);
for (int i = 0; i < noteCount; i++)
{
while (pattern.IsFilled(nextColumn))
while (pattern.ColumnHasObject(nextColumn))
nextColumn = Random.Next(RandomStart, columnLimit);
// Add normal note