aboutsummaryrefslogtreecommitdiff
path: root/Bitspace 2.0/Bitspace 2.0/Game map/Map.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Bitspace 2.0/Bitspace 2.0/Game map/Map.cs')
-rw-r--r--Bitspace 2.0/Bitspace 2.0/Game map/Map.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/Bitspace 2.0/Bitspace 2.0/Game map/Map.cs b/Bitspace 2.0/Bitspace 2.0/Game map/Map.cs
index 24902f2..bf4a6fd 100644
--- a/Bitspace 2.0/Bitspace 2.0/Game map/Map.cs
+++ b/Bitspace 2.0/Bitspace 2.0/Game map/Map.cs
@@ -15,10 +15,11 @@ namespace Bitspace_2._0.Game_map {
public static int MinY = 0;
public static int MaxY;
- public static Dictionary<string, Biome> biomeDB = new Dictionary<string, Biome>() {
+ public static Dictionary<string, Biome> Biomes = new Dictionary<string, Biome>() {
{ "Grass", new Biome("Grass", ',', ConsoleColor.Green, 0, 1) },
- { "Water", new Biome("Water", '-', ConsoleColor.Blue, true, 1, 0) },
- { "Lava", new Biome("Lava", '#', ConsoleColor.Red, 2, 0) }
+ { "Water", new Biome("Water", '-', ConsoleColor.Blue, true, 0, 0) },
+ { "Lava", new Biome("Lava", '#', ConsoleColor.Red, true, 5, 0) },
+ { "Rock_spikes", new Biome("Rock_spikes", ';', ConsoleColor.Gray, 2, 1) }
};
public static void Generate(int width, int height) {
@@ -62,16 +63,16 @@ namespace Bitspace_2._0.Game_map {
Biome currBiome;
if (randomNumber.Next(4) > 0) { // 3/4 chance that the biome will not hurt and will not suffocate
- currBiome = biomeDB.Values.Where(x => x.DamagePoints == 0).ElementAt(randomNumber.Next(biomeDB.Values.Count(x => x.DamagePoints == 0)));
+ currBiome = Biomes.Values.Where(x => x.DamagePoints == 0).ElementAt(randomNumber.Next(Biomes.Values.Count(x => x.DamagePoints == 0)));
}
else {
if (randomNumber.Next(5) > 0) { // 4/5 chance that the biome will hurt and suffocate
- currBiome = biomeDB.Values.Where(x => x.DamagePoints > 0 && x.Suffocate)
- .ElementAt(randomNumber.Next(biomeDB.Values.Count(x => x.DamagePoints > 0 && x.Suffocate)));
+ currBiome = Biomes.Values.Where(x => x.DamagePoints > 0 && x.Suffocate)
+ .ElementAt(randomNumber.Next(Biomes.Values.Count(x => x.DamagePoints > 0 && x.Suffocate)));
}
else { // 1/5 chance that the biome will hurt but won't suffocate
- currBiome = biomeDB.Values.Where(x => x.DamagePoints > 0 && !x.Suffocate)
- .ElementAt(randomNumber.Next(biomeDB.Values.Count(x => x.DamagePoints > 0 && !x.Suffocate)));
+ currBiome = Biomes.Values.Where(x => x.DamagePoints > 0 && !x.Suffocate)
+ .ElementAt(randomNumber.Next(Biomes.Values.Count(x => x.DamagePoints > 0 && !x.Suffocate)));
}
}
return currBiome;