OperatorStatusRenderer.cs
1 using GUNRPG.Core.VirtualPet; 2 3 namespace GUNRPG.Core.Rendering; 4 5 /// <summary> 6 /// Temporary, replaceable text-based renderer for operator status. 7 /// This is NOT the final TUI. This is a simple presentation layer for debugging and gameplay visibility. 8 /// </summary> 9 /// <remarks> 10 /// This renderer will be replaced by a proper TUI in the future. 11 /// </remarks> 12 public static class OperatorStatusRenderer 13 { 14 /// <summary> 15 /// Renders operator status to the console. 16 /// Displays all operator stats in clear labeled sections with ASCII separators for readability. 17 /// </summary> 18 /// <param name="view">The operator status view to render.</param> 19 public static void Render(OperatorStatusView view) 20 { 21 Console.WriteLine("================================================================================"); 22 Console.WriteLine(" OPERATOR STATUS"); 23 Console.WriteLine("================================================================================"); 24 Console.WriteLine(); 25 26 // Physical section 27 Console.WriteLine("PHYSICAL"); 28 Console.WriteLine("--------"); 29 Console.WriteLine($" Health: {view.Health,3:F0}"); 30 Console.WriteLine($" Injury: {view.Injury,3:F0}"); 31 Console.WriteLine($" Fatigue: {view.Fatigue,3:F0}"); 32 Console.WriteLine(); 33 34 // Mental section 35 Console.WriteLine("MENTAL"); 36 Console.WriteLine("------"); 37 Console.WriteLine($" Stress: {view.Stress,3:F0}"); 38 Console.WriteLine($" Morale: {view.Morale,3:F0}"); 39 Console.WriteLine(); 40 41 // Care section 42 Console.WriteLine("CARE"); 43 Console.WriteLine("----"); 44 Console.WriteLine($" Hunger: {view.Hunger,3:F0}"); 45 Console.WriteLine($" Hydration: {view.Hydration,3:F0}"); 46 Console.WriteLine(); 47 48 // Derived values (only shown if present) 49 if (view.CombatReadiness.HasValue) 50 { 51 Console.WriteLine("DERIVED"); 52 Console.WriteLine("-------"); 53 Console.WriteLine($" Combat Readiness: {view.CombatReadiness.Value,3:F0}"); 54 Console.WriteLine(); 55 } 56 57 Console.WriteLine("================================================================================"); 58 } 59 }