// Static Public fields for holding constant information; public static void UI() { Console.Clear(); Console.ForegroundColor = ConsoleColor.Red; Console.SetCursorPosition(0, 0); Console.WriteLine("______________________________________________________________________________________________________________"); Console.ForegroundColor = ConsoleColor.White; Console.SetCursorPosition(3, 1); Console.WriteLine("Name: {0}", V.character); Console.SetCursorPosition(24, 1); Console.WriteLine("Cargo: {0}/{1}", V.curInventory = V.invFood + V.invResearch + V.invAnimals + V.invWater + V.invDarkMatter, V.maxInventory); Console.SetCursorPosition(49, 1); Console.WriteLine("Fuel: {0}/{1}", Ship.curFuel, Ship.ShowShipMaxFuel(Ship.currentShip)); Console.SetCursorPosition(70, 1); Console.WriteLine("Credits: {0}", V.credits); Console.SetCursorPosition(95, 1); Console.WriteLine("Year: {0}", V.time); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("______________________________________________________________________________________________________________"); Console.ForegroundColor = ConsoleColor.DarkCyan; } // Code for UI
// Congrats Window when buying ship private void Congrats() { Program.UI(); Console.WriteLine("Congratulations on your new ship!!!!!"); Console.WriteLine("You now have a new max speed, cargo, and fuel!"); Console.WriteLine(); Console.WriteLine("New Max Speed: {0}. New Max Cargo: {1}. New Max Fuel: {2}", Ship.ShowShipSpeed(Ship.currentShip), V.maxInventory, Ship.ShowShipMaxFuel(Ship.currentShip)); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine("Press 'enter' to return to Main Menu"); Console.ReadLine(); }