private SpawnPattern getRandomPattern() { Dictionary <int, float> weights = new Dictionary <int, float>(); weights.Add(0, 25f); weights.Add(1, 5.0f); weights.Add(2, 40f); weights.Add(3, 30f); var pick = Weighted.getWeightedPick(weights); switch (pick) { case 0: return(getDiagonalPattern()); case 1: return(getLanePattern()); case 2: return(getDumbPattern()); case 3: return(getThickyLinePattern()); default: return(null); } }