Skip to content

Commit

Permalink
Removed old automapped. Added new one, it's not bad but definitely no…
Browse files Browse the repository at this point in the history
…t done yet. Moved some methods around.
  • Loading branch information
Loloppe committed Mar 16, 2022
1 parent 393c5b8 commit 6317e55
Show file tree
Hide file tree
Showing 18 changed files with 1,137 additions and 2,703 deletions.
1 change: 1 addition & 0 deletions Lolighter/Algorithm/Arc.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Lolighter.Data.Structure;
using System.Collections.Generic;
using System.Linq;
using static Lolighter.Info.Enumerator;
using static Lolighter.Info.Helper;

namespace Lolighter.Algorithm
Expand Down
36 changes: 18 additions & 18 deletions Lolighter/Algorithm/Bomb.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Lolighter.Data.Structure;
using System;
using Lolighter.Info;
using System.Collections.Generic;
using System.Linq;
using static Lolighter.Info.Helper;
using static Lolighter.Info.Enumerator;

namespace Lolighter.Algorithm
{
Expand Down Expand Up @@ -106,7 +106,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
switch (n.direction)
{
case CutDirection.LEFT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.LEFT, Layer.TOP));
}
Expand All @@ -116,7 +116,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.RIGHT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.LEFT, Layer.TOP));
}
Expand Down Expand Up @@ -149,7 +149,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
newBomb.Add(new BombNote(n.beat, Line.LEFT, Layer.MIDDLE));
break;
case CutDirection.LEFT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.MIDDLE_LEFT, Layer.TOP));
}
Expand All @@ -159,7 +159,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.RIGHT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.MIDDLE_LEFT, Layer.TOP));
}
Expand All @@ -169,7 +169,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.UP_LEFT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.LEFT, Layer.BOTTOM));
}
Expand All @@ -179,7 +179,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.UP_RIGHT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.LEFT, Layer.TOP));
}
Expand All @@ -189,7 +189,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.DOWN_LEFT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.LEFT, Layer.TOP));
}
Expand All @@ -199,7 +199,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.DOWN_RIGHT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.LEFT, Layer.BOTTOM));
}
Expand All @@ -220,7 +220,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
newBomb.Add(new BombNote(n.beat, Line.RIGHT, Layer.MIDDLE));
break;
case CutDirection.LEFT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.MIDDLE_RIGHT, Layer.TOP));
}
Expand All @@ -230,7 +230,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.RIGHT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.MIDDLE_RIGHT, Layer.TOP));
}
Expand All @@ -240,7 +240,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.UP_LEFT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.MIDDLE_LEFT, Layer.BOTTOM));
}
Expand All @@ -250,7 +250,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.UP_RIGHT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.MIDDLE_LEFT, Layer.TOP));
}
Expand All @@ -260,7 +260,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.DOWN_LEFT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.MIDDLE_LEFT, Layer.TOP));
}
Expand All @@ -270,7 +270,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.DOWN_RIGHT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.MIDDLE_LEFT, Layer.BOTTOM));
}
Expand All @@ -285,7 +285,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
switch (n.direction)
{
case CutDirection.LEFT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.RIGHT, Layer.TOP));
}
Expand All @@ -295,7 +295,7 @@ public static List<BombNote> CreateBomb(List<ColorNote> noteTemp)
}
break;
case CutDirection.RIGHT:
if (RandNumber(0, 2) == 0)
if (Utils.RandNumber(0, 2) == 0)
{
newBomb.Add(new BombNote(n.beat, Line.RIGHT, Layer.TOP));
}
Expand Down
4 changes: 3 additions & 1 deletion Lolighter/Algorithm/Chain.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Lolighter.Data.Structure;
using Lolighter.Info;
using System.Collections.Generic;
using static Lolighter.Info.Enumerator;
using static Lolighter.Info.Helper;

namespace Lolighter.Algorithm
Expand Down Expand Up @@ -46,7 +48,7 @@ static public (List<BurstSliderData>, List<ColorNote>) Chains(List<ColorNote> no
// Create chain for the remaining notes
foreach (ColorNote now in temp)
{
size = RandNumber(4, 9);
size = Utils.RandNumber(4, 9);

switch (now.layer) //Process the note into a sliders depending on layer, lane and cut direction manually. This is pretty Pepega.
{
Expand Down
5 changes: 3 additions & 2 deletions Lolighter/Algorithm/DoubleDirectional.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using Lolighter.Data.Structure;
using Lolighter.Info;
using System.Collections.Generic;
using System.Linq;
using static Lolighter.Info.Helper;
using static Lolighter.Info.Enumerator;

namespace Lolighter.Algorithm
{
Expand Down Expand Up @@ -304,7 +305,7 @@ static public (List<ColorNote>, List<BurstSliderData>) Emilia(List<ColorNote> no
sliders[i].First().line = temp;
}

int size = RandNumber(4, 9);
int size = Utils.RandNumber(4, 9);
BurstSliderData newSlider = new(sliders[i].First(), sliders[i].Last().beat, sliders[i].Last().line, sliders[i].Last().layer, size, 0.8f);
burstSliders.Add(newSlider);
}
Expand Down
5 changes: 3 additions & 2 deletions Lolighter/Algorithm/DownLight.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using Lolighter.Data.Structure;
using static Lolighter.Info.Helper;
using Lolighter.Info;
using static Lolighter.Info.Enumerator;

namespace Lolighter.Algorithm
{
Expand Down Expand Up @@ -126,7 +127,7 @@ static List<BasicEventData> Mod(List<BasicEventData> light, double speed)
{
if (now.value == EventLightValue.BLUE_FADE || now.value == EventLightValue.RED_FADE || now.value == EventLightValue.BLUE_ON || now.value == EventLightValue.RED_ON)
{
now.value = Swap(now.value);
now.value = Utils.Swap(now.value);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Lolighter/Algorithm/Invert.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Lolighter.Data.Structure;
using System.Collections.Generic;
using static Lolighter.Info.Helper;
using static Lolighter.Info.Enumerator;

namespace Lolighter.Algorithm
{
Expand Down
11 changes: 6 additions & 5 deletions Lolighter/Algorithm/Light.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using Lolighter.Data.Structure;
using Lolighter.Info;
using System.Collections.Generic;
using System.Linq;
using static Lolighter.Info.Helper;
using static Lolighter.Info.Enumerator;

namespace Lolighter.Algorithm
{
Expand Down Expand Up @@ -90,7 +91,7 @@ void TimerDuration() //Check the checkpoint
int swapTime = (int)((time[0] - time[1]) / ColorSwap) + 1; //We get the number of "beat" since the last time it entered here this way.
for (int i = 0; i < swapTime; i++) //For each time that it need to swap. (Dumb fix for a dumb method)
{
color = Inverse(color); //Swap color
color = Utils.Inverse(color); //Swap color
offset += ColorSwap; //Offset incremented
}
}
Expand Down Expand Up @@ -250,23 +251,23 @@ void TimerDuration() //Check the checkpoint
{
if (x.beat - lastTimeTop <= 1)
{
x.value = Swap(x.value);
x.value = Utils.Swap(x.value);
}
lastTimeTop = x.beat;
}
else if (x.eventType == EventType.RING)
{
if (x.beat - lastTimeNeon <= 1)
{
x.value = Swap(x.value);
x.value = Utils.Swap(x.value);
}
lastTimeNeon = x.beat;
}
else if (x.eventType == EventType.SIDE)
{
if (x.beat - lastTimeSide <= 1)
{
x.value = Swap(x.value);
x.value = Utils.Swap(x.value);
}
lastTimeSide = x.beat;
}
Expand Down
Loading

0 comments on commit 6317e55

Please sign in to comment.