Add a basic status command

This commit is contained in:
Jaculabilis 2023-04-04 20:54:53 -07:00 committed by Tim Van Baak
parent 36e2224324
commit c5bd74ae1e

View File

@ -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;