Add a real CLI for adjudication
This commit is contained in:
parent
9fd63f4317
commit
135997a7cd
|
@ -0,0 +1,15 @@
|
||||||
|
using CommandLine;
|
||||||
|
|
||||||
|
namespace MultiversalDiplomacy.CommandLine;
|
||||||
|
|
||||||
|
[Verb("adjudicate", HelpText = "Adjudicate a Multiversal Diplomacy game state.")]
|
||||||
|
public class AdjudicateOptions
|
||||||
|
{
|
||||||
|
[Value(0, HelpText = "Input file describing the game state to adjudicate, or - to read from stdin.")]
|
||||||
|
public string? InputFile { get; set; }
|
||||||
|
|
||||||
|
public static void Execute(AdjudicateOptions args)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,4 +7,8 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
using System;
|
using CommandLine;
|
||||||
|
|
||||||
|
using MultiversalDiplomacy.CommandLine;
|
||||||
|
|
||||||
|
namespace MultiversalDiplomacy;
|
||||||
|
|
||||||
namespace MultiversalDiplomacy
|
|
||||||
{
|
|
||||||
internal class Program
|
internal class Program
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Console.WriteLine("stab");
|
var parser = Parser.Default;
|
||||||
}
|
var parseResult = parser.ParseArguments<AdjudicateOptions>(args);
|
||||||
|
|
||||||
|
parseResult
|
||||||
|
.WithParsed(AdjudicateOptions.Execute);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue