Add two more CLI verbs to implement
This commit is contained in:
parent
135997a7cd
commit
0ee31a9629
|
@ -0,0 +1,15 @@
|
||||||
|
using CommandLine;
|
||||||
|
|
||||||
|
namespace MultiversalDiplomacy.CommandLine;
|
||||||
|
|
||||||
|
[Verb("image", HelpText = "Generate an image of a game state.")]
|
||||||
|
public class ImageOptions
|
||||||
|
{
|
||||||
|
[Value(0, HelpText = "Input file describing the game state to visualize, or - to read from stdin.")]
|
||||||
|
public string? InputFile { get; set; }
|
||||||
|
|
||||||
|
public static void Execute(ImageOptions args)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
using CommandLine;
|
||||||
|
|
||||||
|
namespace MultiversalDiplomacy.CommandLine;
|
||||||
|
|
||||||
|
[Verb("repl", HelpText = "Begin an interactive 5dplomacy session.")]
|
||||||
|
public class ReplOptions
|
||||||
|
{
|
||||||
|
[Option('i', "input", HelpText = "Begin the repl session by executing the commands in this file.")]
|
||||||
|
public string? InputFile { get; set; }
|
||||||
|
|
||||||
|
[Option('o', "output", HelpText = "Echo the repl session to this file. Specify a directory to autogenerate a filename.")]
|
||||||
|
public string? OutputFile { get; set; }
|
||||||
|
|
||||||
|
public static void Execute(ReplOptions args)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,9 +9,15 @@ internal class Program
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
var parser = Parser.Default;
|
var parser = Parser.Default;
|
||||||
var parseResult = parser.ParseArguments<AdjudicateOptions>(args);
|
var parseResult = parser.ParseArguments(
|
||||||
|
args,
|
||||||
|
typeof(AdjudicateOptions),
|
||||||
|
typeof(ImageOptions),
|
||||||
|
typeof(ReplOptions));
|
||||||
|
|
||||||
parseResult
|
parseResult
|
||||||
.WithParsed(AdjudicateOptions.Execute);
|
.WithParsed<AdjudicateOptions>(AdjudicateOptions.Execute)
|
||||||
|
.WithParsed<ImageOptions>(ImageOptions.Execute)
|
||||||
|
.WithParsed<ReplOptions>(ReplOptions.Execute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue