Code cleanup

This commit is contained in:
2026-05-27 10:51:19 -04:00
parent 5e486b0edb
commit 2423d232cf
48 changed files with 53731 additions and 46250 deletions
+32 -31
View File
@@ -10,23 +10,23 @@
<h2>Build Order</h2>
<table class="calculator-table">
<thead>
<tr>
<th>Turn Requested</th>
<th>Building</th>
<th>Finish Turn</th>
<th>Industry Remaining</th>
</tr>
<tr>
<th>Turn Requested</th>
<th>Building</th>
<th>Finish Turn</th>
<th>Industry Remaining</th>
</tr>
</thead>
<tbody>
@foreach (var entry in Result.BuildOrder)
{
<tr>
<td>@entry.RequestedTurn</td>
<td>@entry.Name</td>
<td>@(entry.BuiltFinishTurn == 0 ? "Starting" : entry.BuiltFinishTurn.ToString())</td>
<td>@entry.IndustryCostRemaining</td>
</tr>
}
@foreach (var entry in Result.BuildOrder)
{
<tr>
<td>@entry.RequestedTurn</td>
<td>@entry.Name</td>
<td>@(entry.BuiltFinishTurn == 0 ? "Starting" : entry.BuiltFinishTurn.ToString())</td>
<td>@entry.IndustryCostRemaining</td>
</tr>
}
</tbody>
</table>
</section>
@@ -35,23 +35,23 @@
<h2>Gold Over Time</h2>
<table class="calculator-table">
<thead>
<tr>
<th>Turn</th>
<th>Stored Gold</th>
<th>Income</th>
<th>Upkeep</th>
</tr>
<tr>
<th>Turn</th>
<th>Stored Gold</th>
<th>Income</th>
<th>Upkeep</th>
</tr>
</thead>
<tbody>
@foreach (var snapshot in Result.ResourceHistory)
{
<tr>
<td>@snapshot.Turn</td>
<td>@snapshot.Stored.Gold</td>
<td>@snapshot.TotalIncome.Gold</td>
<td>@snapshot.TotalUpkeep.Gold</td>
</tr>
}
@foreach (var snapshot in Result.ResourceHistory)
{
<tr>
<td>@snapshot.Turn</td>
<td>@snapshot.Stored.Gold</td>
<td>@snapshot.TotalIncome.Gold</td>
<td>@snapshot.TotalUpkeep.Gold</td>
</tr>
}
</tbody>
</table>
</section>
@@ -68,12 +68,13 @@
protected override void OnInitialized()
{
Result = BuildingPlanCalculator.CreateSampleBuildPlan(60);
Result = BuildingPlanCalculator.CreateSampleBuildPlan();
Json = JsonSerializer.Serialize(Result, new JsonSerializerOptions
{
WriteIndented = true
});
}
}
<style>