void kimmotaUfoja() {
		
		Pelaaja p1 = Main.p1;
		Pelaaja p2 = Main.p2;
				
		if (etaisyys(p1.x,p1.y,p2.x,p2.y) < p1.sade+p2.sade && Main.kimmotusOk) {
			double vx_vanha = p1.vx;
			double vy_vanha = p1.vy;
				
			double xKompA = p2.vx*Math.sqrt(2*p1.sade*2*p1.sade - (p1.y-p2.y)*(p1.y-p2.y))/(2*p1.sade);
			double yKompA = p2.vy*(1 - (Math.sqrt(2*p1.sade*2*p1.sade - (p1.x-p2.x)*(p1.x-p2.x))/(2*p1.sade)));
			p1.vx = xKompA;
			if (xKompA > 0)
				p1.vx += Math.abs(yKompA);
			else
				p1.vx -= Math.abs(yKompA); 
				    
			double yKompB = p2.vy*Math.sqrt(2*p1.sade*2*p1.sade - (p1.x-p2.x)*(p1.x-p2.x))/(2*p1.sade);
			double xKompB =	p2.vx*(1 - (Math.sqrt(2*p1.sade*2*p1.sade - (p1.y-p2.y)*(p1.y-p2.y))/(2*p1.sade)));
			p1.vy = yKompB;
			if (yKompB > 0)
				p1.vy += Math.abs(xKompB);
			else
				p1.vy -= Math.abs(xKompB); 

			double xKompA2 = vx_vanha*Math.sqrt(2*p1.sade*2*p1.sade - (p1.y-p2.y)*(p1.y-p2.y))/(2*p1.sade);
			double yKompA2 = vy_vanha*(1 - (Math.sqrt(2*p1.sade*2*p1.sade - (p1.x-p2.x)*(p1.x-p2.x))/(2*p1.sade)));
			p2.vx = xKompA2;
			if (xKompA2 > 0)
				p2.vx += Math.abs(yKompA2);
			else
				p2.vx -= Math.abs(yKompA2); 
				    
			double yKompB2 = vy_vanha*Math.sqrt(2*p1.sade*2*p1.sade - (p1.x-p2.x)*(p1.x-p2.x))/(2*p1.sade);
			double xKompB2 = vx_vanha*(1 - (Math.sqrt(2*p1.sade*2*p1.sade - (p1.y-p2.y)*(p1.y-p2.y))/(2*p1.sade)));
			p2.vy = yKompB2;
			if (yKompB2 > 0)
				p2.vy += Math.abs(xKompB2);
			else
				p2.vy -= Math.abs(xKompB2);

			Main.palkkalaskuri = 0;
			
			if (Main.hippa == 1) {
				Main.hippa = 2;
				Main.p1.tienesti = 0;
			} else {
				Main.hippa = 1;
				Main.p2.tienesti = 0;
			}
			
			Main.kimmotusOk = false;
		}
		if (etaisyys(p1.x,p1.y,p2.x,p2.y) > p1.sade+p2.sade + 5) {
			Main.kimmotusOk = true;
		}
	}