From c5bd74ae1e429109aa8ca03eb20c6e30fd01f6da Mon Sep 17 00:00:00 2001 From: Jaculabilis Date: Tue, 4 Apr 2023 20:54:53 -0700 Subject: [PATCH] Add a basic status command --- MultiversalDiplomacy/Script/GameScriptHandler.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MultiversalDiplomacy/Script/GameScriptHandler.cs b/MultiversalDiplomacy/Script/GameScriptHandler.cs index 321e7cb..1ef0659 100644 --- a/MultiversalDiplomacy/Script/GameScriptHandler.cs +++ b/MultiversalDiplomacy/Script/GameScriptHandler.cs @@ -32,6 +32,7 @@ public class GameScriptHandler : IScriptHandler Console.WriteLine("commands:"); Console.WriteLine(" list: list things in a game category"); Console.WriteLine(" orders: submit order sets"); + Console.WriteLine(" status: overview of the state of the game"); break; case "list" when args.Length == 1: @@ -70,6 +71,17 @@ public class GameScriptHandler : IScriptHandler Console.WriteLine("Unrecognized power"); break; + case "status": + foreach (Season season in World.Seasons) + { + Console.WriteLine($"{season}"); + foreach (Unit unit in World.Units.Where(u => u.Season == season)) + { + Console.WriteLine($" {unit}"); + } + } + break; + default: Console.WriteLine("Unrecognized command"); break;