public int moonObjectId(moonTypes moon) { /* * 34 M Mond * 36 L Mond * 37 N Mond * 38 G Mond * 39 K Mond * 40 H Mond * 41 X Mond * 42 Toxic Mond * 43 Gasriese * 44 Asteroidenmond */ switch (moon) { // public enum planetTypes { VeryVolcanic = 0, Volcanic = 1, Desert = 2, Water = 3, Land = 4, Earthlike = 5, Jungle= 6, Barren = 7, Ice = 8, NoAtmosphere = 9, HugeGasGiant = 10, SmallGasGiant = 11, StonyMountain = 12, ThickPosinousAtmosphere = 13 }; case moonTypes.VeryVolcanic: return(41); case moonTypes.Volcanic: return(41); case moonTypes.Desert: return(38); case moonTypes.Water: return(34); case moonTypes.Land: return(34); case moonTypes.Earthlike: return(34); case moonTypes.Jungle: //Todo: is a subtype of land. as well as swamp. should be implemented so return(34); case moonTypes.Barren: return(40); case moonTypes.Ice: return(39); case moonTypes.NoAtmosphere: return(44); case moonTypes.StonyMountain: return(44); case moonTypes.ThickPosinousAtmosphere: return(42); } return(22); }
public int getMoonType(int _circle) { //circles begin with 1, but our list starts with 0, same with maxcircles _circle--; int circleToCheck = (100 / (maxCircles - 1)) * _circle; moonTypes newType = (moonTypes)moonPropability[circleToCheck][RandomHelper.GetRandomInt(0, moonPropability[circleToCheck].Count)]; return(moonObjectId(newType)); }
public void addMoonPropabilities(int _circleFrom, int _circleTo, int amount, moonTypes moonType) { for (int i = _circleFrom; i < _circleTo; i++) { for (int j = 0; j < amount; j++) { moonPropability[i].Add((int)moonType); } } }