Przeglądaj źródła

Small size bug fixed in Terrain

Supermaniac101 10 lat temu
rodzic
commit
25647615f3
1 zmienionych plików z 12 dodań i 2 usunięć
  1. 12 2
      src/gui/simulator/Terrain.java

+ 12 - 2
src/gui/simulator/Terrain.java

@@ -45,8 +45,10 @@ public class Terrain extends JPanel {
 
     public Terrain(int length, int width, SimulatorPane.Terrains terrain){
     	//get values
-    	this.length = length;
-    	this.width = width;
+    	this.length = 2000;
+    	this.width = 3000;
+    	setLength(length);
+    	setWidth(width);
     	this.terrain = terrain;
     	//set terrainbackground
     	switch(terrain){
@@ -282,6 +284,14 @@ public class Terrain extends JPanel {
 		return tx;
 	}
     
+    public void setLength(int length){
+    	this.length = length;
+    }
+    
+    public void setWidth(int width){
+    	this.width = width;
+    }
+    
     public int getLength(){
     	return length;
     }