Add subcommands to new

This commit is contained in:
Jaculabilis 2022-12-31 13:53:07 -08:00
parent 8ec727498a
commit f61982d91e
1 changed files with 15 additions and 3 deletions

View File

@ -30,10 +30,22 @@ public class ReplScriptHandler : IScriptHandler
Console.WriteLine("stab");
break;
case "new":
var world = GameController.InitializeWorld();
case "new" when args.Length == 1:
Console.WriteLine("usage:");
Console.WriteLine(" new blank: standard map, no units");
Console.WriteLine(" new standard: standard map, standard units");
break;
case "new" when args[1] == "blank":
var world = MultiversalDiplomacy.Model.World.WithStandardMap();
var handler = new GameScriptHandler(world);
Console.WriteLine("Started a new game");
Console.WriteLine("Created an empty game");
return handler;
case "new" when args[1] == "standard":
world = GameController.InitializeWorld();
handler = new GameScriptHandler(world);
Console.WriteLine("Created a standard game");
return handler;
default: