MiniScreen ChooseGame() { beginSong = true; if (practiceMode) { return(GetMostLost()); } //Generates 0, 1 int num = random.Next(0, 2); switch (num) { case 0: { if (lastGame == 0) { timesRepeated++; if (timesRepeated >= 2) { goto case 1; } } else { timesRepeated = 0; } lastGame = 0; Battle b = new Battle(cm, bufferTarget, graphicsDevice, pp, score); lio = score < 20 ? lio = contentManager.Load <Texture2D>("Battle/Enemies/Explainer_" + b.GetEnemyName()) : contentManager.Load <Texture2D>("Menus/TransitionTest"); countdownColor = Color.White; return(b); } case 1: { if (lastGame == 1) { timesRepeated++; if (timesRepeated >= 2) { goto case 0; } } else { timesRepeated = 0; } lastGame = 1; lio = score < 20 ? lio = contentManager.Load <Texture2D>("Menus/TransitionApples_2") : contentManager.Load <Texture2D>("Menus/TransitionApples"); countdownColor = Color.Purple; return(new FallingApples(cm, score)); } default: return(new Galaga(cm, bufferTarget, graphicsDevice, pp)); } }
//TODO: Make other stuff use this MiniScreen GetMostLost() { if (GetLossRatio("Battle") > GetLossRatio("Apples")) { Battle b = new Battle(cm, bufferTarget, graphicsDevice, pp, score); lio = score < 10 ? lio = contentManager.Load <Texture2D>("Battle/Enemies/Explainer_" + b.GetEnemyName()) : contentManager.Load <Texture2D>("Menus/TransitionTest"); return(b); } else { lio = contentManager.Load <Texture2D>("Menus/TransitionApples"); return(new FallingApples(cm, score)); } }