Add subcommands to new
This commit is contained in:
parent
8ec727498a
commit
f61982d91e
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue