public void paint(Graphics g){
//		if(!set) return;
		Graphics2D g2 = (Graphics2D)g;
		for(int i = 0; i < map.length; i++){
			for(int j = 0; j < map[0].length; j++){
				float x = map[i][j];
				if(x > 1) x = 1;
				else if (x < 0) x = 0;
				
				g2.setColor(new Color(x,x,x));
				g2.fillRect(i*scale,j*scale,scale,scale);
				g2.setColor(Color.black);
			}
		}
	}