private void ShuffleAndAddRoundMarkers() { RoundMarker r1 = new RoundMarker("Fish", "Clay", false, 1); RoundMarker r2 = new RoundMarker("Iron", "Franc", false, 2); RoundMarker r3 = new RoundMarker("Fish", "Grain", false, 3); RoundMarker r4 = new RoundMarker("Wood", "Clay", false, 4); RoundMarker r5 = new RoundMarker("Fish", "Wood", true, 5); RoundMarker r6 = new RoundMarker("Franc", "Wood", false, 6); RoundMarker r7 = new RoundMarker("Wood", "Cattle", false, 7); roundMarkerList.Add(r1); roundMarkerList.Add(r2); roundMarkerList.Add(r3); roundMarkerList.Add(r4); roundMarkerList.Add(r5); roundMarkerList.Add(r6); roundMarkerList.Add(r7); //Shuffle Random random = new Random(); for (int i = roundMarkerList.Count; i > 1; i--) { int j = random.Next(i); RoundMarker temp = roundMarkerList[j]; roundMarkerList[j] = roundMarkerList[i - 1]; roundMarkerList[i - 1] = temp; } }
private void AddNewResources(RoundMarker roundMarker) { switch (roundMarker.Id) { case (1): fish++; clay++; fish_lbl.Text = fish.ToString(); clay_lbl.Text = clay.ToString(); break; case (2): iron++; francs++; iron_lbl.Text = iron.ToString(); francs_lbl.Text = francs.ToString(); break; case (3): fish++; grain++; fish_lbl.Text = fish.ToString(); grain_lbl.Text = grain.ToString(); break; case (4): wood++; clay++; wood_lbl.Text = wood.ToString(); clay_lbl.Text = clay.ToString(); break; case (5): fish++; wood++; fish_lbl.Text = fish.ToString(); wood_lbl.Text = wood.ToString(); game.PayInterest(); UpdatePlayerResources(); break; case (6): francs++; wood++; francs_lbl.Text = francs.ToString(); wood_lbl.Text = wood.ToString(); break; case (7): wood++; cattle++; wood_lbl.Text = wood.ToString(); cattle_lbl.Text = cattle.ToString(); break; } }