Auto formatting
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
<LayoutMediumContentComponent>
|
||||
<WebsiteTitleComponent>Economy Comparision</WebsiteTitleComponent>
|
||||
|
||||
|
||||
<PaperComponent>
|
||||
<div>You</div>
|
||||
<EconomyInputComponent ForPlayer="0"/>
|
||||
@@ -42,6 +42,7 @@
|
||||
</LayoutMediumContentComponent>
|
||||
|
||||
@code {
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
@@ -52,4 +53,5 @@
|
||||
{
|
||||
EconomyComparisonService.Unsubscribe(StateHasChanged);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
@foreach (var point in chart.Points)
|
||||
{
|
||||
var xCoord = point.GetInterval(chart.HighestIntervalPoint, chart.IntervalDisplayMax);
|
||||
|
||||
|
||||
var show = int.Parse(xCoord) / 6 % 2;
|
||||
var player = index - 1;
|
||||
|
||||
@@ -79,18 +79,17 @@
|
||||
|
||||
void OnBuilderOrderChanged()
|
||||
{
|
||||
|
||||
charts = new List<ChartModel>();
|
||||
var index = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
highestAlloyPoint = 0;
|
||||
|
||||
|
||||
foreach (var buildToCompare in economyComparisonService.BuildsToCompare)
|
||||
{
|
||||
GenerateChart(index++, buildToCompare);
|
||||
}
|
||||
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
@@ -124,7 +123,6 @@
|
||||
};
|
||||
|
||||
|
||||
|
||||
for (var interval = 0; interval < economyOverTime.Count(); interval++)
|
||||
{
|
||||
var alloyPoint = new PointModel { Interval = interval };
|
||||
|
||||
@@ -63,13 +63,13 @@
|
||||
|
||||
@code {
|
||||
private int StartingAdvantageAtTime = 0;
|
||||
|
||||
|
||||
private int PeakAdvantageByAlloy = 0;
|
||||
private int PeakAdvantageAtTime = 0;
|
||||
|
||||
private int WorseningTime = 0;
|
||||
private int MiracleTime = 0;
|
||||
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
@@ -87,8 +87,8 @@
|
||||
StartingAdvantageAtTime = 0;
|
||||
WorseningTime = 0;
|
||||
MiracleTime = 0;
|
||||
|
||||
for (int interval = 0; interval < economyComparisonService.BuildsToCompare[0].EconomyOverTimeModel.Count; interval++)
|
||||
|
||||
for (var interval = 0; interval < economyComparisonService.BuildsToCompare[0].EconomyOverTimeModel.Count; interval++)
|
||||
{
|
||||
var yourEconomy = economyComparisonService.BuildsToCompare[0].EconomyOverTimeModel[interval];
|
||||
var theirEconomy = economyComparisonService.BuildsToCompare[1].EconomyOverTimeModel[interval];
|
||||
@@ -109,16 +109,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (PeakAdvantageByAlloy > 0 && WorseningTime == 0)
|
||||
{
|
||||
WorseningTime = interval;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (deltaEconomy < -1000 && MiracleTime == 0)
|
||||
{
|
||||
MiracleTime = interval;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
<FormLabelComponent>Number of TownHall Expansions</FormLabelComponent>
|
||||
</FormNumberComponent>
|
||||
<ContentDividerComponent/>
|
||||
|
||||
|
||||
@{
|
||||
var index = 0;
|
||||
}
|
||||
@foreach (var timing in TownHallTimings)
|
||||
{
|
||||
index++;
|
||||
|
||||
<FormNumberComponent Value="@timing" OnChange="(e)=> ChangeBuildTime(e, index - 1)">
|
||||
<FormLabelComponent>
|
||||
TownHall build time
|
||||
</FormLabelComponent>
|
||||
</FormNumberComponent>
|
||||
}
|
||||
|
||||
<FormNumberComponent Value="@timing" OnChange="e => ChangeBuildTime(e, index - 1)">
|
||||
<FormLabelComponent>
|
||||
TownHall build time
|
||||
</FormLabelComponent>
|
||||
</FormNumberComponent>
|
||||
}
|
||||
<ContentDividerComponent/>
|
||||
<FormTextComponent Label="Chart Color" Value="@ChartColor" OnChange="ChangeColor" />
|
||||
<FormTextComponent Label="Chart Color" Value="@ChartColor" OnChange="ChangeColor"/>
|
||||
</FormLayoutComponent>
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
private string ChartColor => economyComparisonService.GetColor(ForPlayer);
|
||||
private string Faction => economyComparisonService.GetFaction(ForPlayer);
|
||||
private List<int> TownHallTimings => economyComparisonService.GetTownHallBuildTimes(ForPlayer);
|
||||
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
Reference in New Issue
Block a user