Skip to content

Commit

Permalink
Added a title and additional minor conversion info not related to gol…
Browse files Browse the repository at this point in the history
…dpackage.
  • Loading branch information
AnOddDoorKnight committed Aug 22, 2022
1 parent 7a372ff commit 6b2496c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gold Splitter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Title>Gold Splitter</Title>
<Description>Allows you to do some commands to ease up calculating on gold in Pathfinder 2e!</Description>
<PackageProjectUrl>https://github.com/AnOddDoorKnight/Gold-Splitter</PackageProjectUrl>
<VersionPrefix>1.1.0</VersionPrefix>
<VersionPrefix>1.1.1</VersionPrefix>
<FileVersion>$(VersionPrefix)</FileVersion>
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion>
<StartupObject>GoldSplitter.Program</StartupObject>
Expand Down
24 changes: 23 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,37 @@ internal static class Program
throw new InvalidOperationException();
}
}),
new ("Stabilize, Takes some values higher than ten and puts them as their higher counterparts.", package =>
{
Console.WriteLine(package.DisperseToAppropriateCoinValues());
}),
};
static void Main()
{
GoldPackage gold = GoldPackage.HumanInput();
PrintTitle();
Console.WriteLine("[1] Use raw copper values, [2] Use a 'package'");
GoldPackage gold;
switch (int.Parse(Console.ReadLine() ?? "1"))
{
case 1:
Console.Write("Copper: ");
gold = new GoldPackage(0, 0, 0, int.Parse(Console.ReadLine() ?? "0"));
break;
case 2:
gold = GoldPackage.HumanInput();
break;
default:
throw new IndexOutOfRangeException();
}
Console.WriteLine("Choose an action:");
for (int i = 0; i < actions.Length; i++)
Console.WriteLine($"{i + 1}. {actions[i].Name}");
actions[int.Parse(Console.ReadLine() ?? "0") - 1].Action.Invoke(gold);
Console.ReadLine();
}
static void PrintTitle()
{
Console.Title = "Gold Splitter : https://github.com/AnOddDoorKnight/Gold-Splitter";
}
}
public record NamedAction<T>(string Name, Action<T> Action);

0 comments on commit 6b2496c

Please sign in to comment.