private void calculatePosition(){
		nx = Math.cos(Math.toRadians(moveAngle));
		ny = Math.sin(Math.toRadians(moveAngle));

		x+=speed*nx;
		y+=speed*ny;
		
		if(x>MainWindow.WIDTH) x = -getWidth();
		if(y>MainWindow.HEIGHT) y = -getHeight();
		
		if(x+getWidth()<0) x = MainWindow.WIDTH;
		if(y+getHeight()<0) y = MainWindow.HEIGHT;
	}