public static void Reset() { GameOver = false; totalPlayers = 250; Entities.Clear(); Players.Clear(); input = new Input(PlayerIndex.One); RaceTrack = new Track(Camera.ScreenBounds.Width / 2, Camera.ScreenBounds.Height / 2, 20); Entities.Add(RaceTrack); generationsText = new Text(8, 8, "Generation", Sprite.Type.Text8x8); generationsNumber = new Number(8, 8 + 2 + 8, 1, 4, 9999, Sprite.Type.Text8x8); startPrompt = new Text(8, Camera.ScreenBounds.Height - 8 - 8 - 2 - 8 - 2 - 8 - 2 - 8, "Start", 1, Sprite.Type.Text8x8, new Color(Color.White, 255)); resetPrompt = new Text(8, Camera.ScreenBounds.Height - 8 - 8 - 2 - 8 - 2 - 8, "Reset", 1, Sprite.Type.Text8x8, new Color(Color.White, 255)); editPrompt = new Text(8, Camera.ScreenBounds.Height - 8 - 8 - 2 - 8, "Edit Track", 1, Sprite.Type.Text8x8, new Color(Color.White, 255)); networkPrompt = new Text(8, Camera.ScreenBounds.Height - 8 - 8, "Draw Neural Network", 1, Sprite.Type.Text8x8, new Color(Color.White, 255)); loadingPrompt = new Text(Camera.ScreenBounds.Width - 8 - 7 * 8, Camera.ScreenBounds.Height - 8 - 8, "Loading...", Sprite.Type.Text8x8); start = false; EditTrack = true; showNetwork = false; loading = false; loadAlgorithm = new Timer(500); HUD.Reset(); NE.Reset(); }
public void Reset() { if (IsDivided) { NW.Reset(); NE.Reset(); SW.Reset(); SE.Reset(); } Members.Clear(); AllMembers.Clear(); NW = NE = SW = SE = null; IsDivided = false; }