diff --git a/core/src/com/unciv/game/TileGroup.java b/core/src/com/unciv/game/TileGroup.java index 2c61f631..5182f3bc 100644 --- a/core/src/com/unciv/game/TileGroup.java +++ b/core/src/com/unciv/game/TileGroup.java @@ -22,7 +22,7 @@ public class TileGroup extends Group { TileGroup(TileInfo tileInfo){ this.tileInfo = tileInfo; - String terrainFileName = "TerrainIcons/" + tileInfo.GetLastTerrain().Name + "_(Civ5).png"; + String terrainFileName = "TerrainIcons/" + tileInfo.GetLastTerrain().Name.replace(' ','_') + "_(Civ5).png"; terrainImage = ImageGetter.getImageByFilename(terrainFileName); terrainImage.setSize(50,50); addActor(terrainImage); diff --git a/core/src/com/unciv/models/LinqCollection.java b/core/src/com/unciv/models/LinqCollection.java index eb46bfe5..f5ebf057 100644 --- a/core/src/com/unciv/models/LinqCollection.java +++ b/core/src/com/unciv/models/LinqCollection.java @@ -43,7 +43,7 @@ public class LinqCollection extends ArrayList { public T getRandom(){ if(size()==0) return null; - return get((int) (Math.random() * (size() - 1))); + return get((int) (Math.random() * (size()))); } public interface Func {