Pārlūkot izejas kodu

Small size bug fixed in Terrain

Supermaniac101 10 gadi atpakaļ
vecāks
revīzija
25647615f3
1 mainītis faili ar 12 papildinājumiem un 2 dzēšanām
  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;
     }