Add subcommands to new
This commit is contained in:
parent
73a8934201
commit
79cfbc2666
|
@ -30,10 +30,22 @@ public class ReplScriptHandler : IScriptHandler
|
||||||
Console.WriteLine("stab");
|
Console.WriteLine("stab");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "new":
|
case "new" when args.Length == 1:
|
||||||
var world = GameController.InitializeWorld();
|
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);
|
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;
|
return handler;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue