public void moveToPoint(Point a, Point b)
	{
		reachedGoal = false;
		self = a;// new Point(x, y);
		double distance = a.distance(b);
		double steps = Math.round(distance / (speedMod * speed));
		double deltaY = Math.round((b.getY() - a.getY()) / steps);
		double deltaX = Math.round((b.getX() - a.getX()) / steps);
		int nextX = this.x;
		int nextY = this.y;
                InputStream in;
		if (Double.isNaN(deltaX) || Double.isNaN(deltaY))
		{

		}
		else if (deltaX > xRestriction)
		{
			deltaX = 1;
		}
		else if (deltaY > yRestriction)
		{
			deltaY = 1;
		}
		if (checkMove((int) (this.x + deltaX), (int) (this.y + deltaY)))
		{
			nextX = ((int) (this.x + deltaX));
			nextY = ((int) (this.y + deltaY));
                        try{
                        String audioFile = "E:\\java\\tankGame\\Sounds\\movetanks.wav";
                        in = new FileInputStream(audioFile);
                            audioStream = new AudioStream(in);
                            AudioPlayer.player.start(audioStream);
                        } catch(Exception ex){
                            System.out.println("Error Exception" + ex);
                        }
			if (deltaX >= 0)
				TankPaint.baseAngle = Math.toDegrees(Math.atan(deltaY / deltaX)) - 90;

			else
				TankPaint.baseAngle = Math.toDegrees(Math.atan(deltaY / deltaX)) + 90;

		}

		/*
		 * if(deltaX>0 && deltaY>0) TankPaint.deg1 = 0; if(deltaX<0 && deltaY>0) TankPaint.deg1 = 90; if(deltaX<0 && deltaY<0) TankPaint.deg1 = 180; if(deltaX>0 && deltaY<0) TankPaint.deg1 = 270;
		 */
		this.x = nextX;
		this.y = nextY;
                
		double distToGoal = new Point(this.x,this.y).distance(b);
                
		if ( distToGoal<= 80){
                    reachedGoal = true;
                       
                if(audioStream != null){
                    AudioPlayer.player.stop(audioStream);
                    }
		}
		System.out.println(distToGoal); //debgugging
                
	}