private void setPath(Point start) {
        int counter = 0;
	path.add(start);
        Point goal = mainPath.get(counter);
        counter++;

        int currentXPos = start.getX();
        int currentYPos = start.getY();


        while(true) {
            while (goal.getX() != currentXPos || goal.getY() != currentYPos) {
		int deltaX = goal.getX() - currentXPos;
		int deltaY = goal.getY()-currentYPos;

                if (deltaX != 0) {
                    int changeInX = deltaX/abs(deltaX); // +/- 1
                    currentXPos += changeInX; // update current XPos
                } else if (deltaY != 0) {
                    int changeInY = deltaY/abs(deltaY); // +/- 1
                    currentYPos += changeInY; // update current YPos
                }

                Point pathPoint = new Point(currentXPos, currentYPos);
		path.add(pathPoint);

            }
            assert (goal.isEmpty());
            if (counter >= mainPath.size()) break;
            goal = mainPath.get(counter);
            counter++;
        }
    }