From 42305c599eeda4146ab7d2ff03f8e6f7f26f708b Mon Sep 17 00:00:00 2001 From: rurouni-hou-ou Date: Sat, 6 Dec 2014 21:29:18 +0000 Subject: [PATCH] Included the viewing of player positions on console. --- TacticalSpaceCheeseRacer/Program.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/TacticalSpaceCheeseRacer/Program.cs b/TacticalSpaceCheeseRacer/Program.cs index cf73859..a9e80ba 100644 --- a/TacticalSpaceCheeseRacer/Program.cs +++ b/TacticalSpaceCheeseRacer/Program.cs @@ -238,6 +238,17 @@ static void PrintAllPositions() Console.WriteLine("{0}. {1} - {2}", playercount + 1, players[playercount].name, players[playercount].position); } } + + /// + /// Macro to clear the console to make it more visualy appealing and display + /// all important information such as positions of all the players. + /// + static void ResetConsole() + { + Console.Clear(); + PrintAllPositions(); + Console.WriteLine(); + } #endregion #region Gameplay Functions @@ -495,7 +506,7 @@ static void Main(string[] args) Console.Write("Press enter to continue..."); Console.ReadLine(); - Console.WriteLine(); + ResetConsole(); } } while (!gamewon);