Add subcommands to new

This commit is contained in:
Jaculabilis 2022-12-31 13:53:07 -08:00 committed by Tim Van Baak
parent 73a8934201
commit 79cfbc2666

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: