private void adjustLocation() {
        double newX = currentLocation.x;
        double newY = currentLocation.y;

        if (newX < Environment.getMinX() || newX > Environment.getMaxX() ||
            newY < Environment.getMinY() || newY > Environment.getMaxY())
        {
            // flags that determine whether or not a coordinate was adjusted
            // setRandomMovementVector();
            
            if (newX < Environment.getMinX()) {
                newX = Environment.getMinX();
            }
            else if (newX > Environment.getMaxX()) {
                newX = Environment.getMaxX();
            }

            if (newY < Environment.getMinY()) {
                newY = Environment.getMinY();
            }
            else if (newY > Environment.getMaxY()) {
                newY = Environment.getMaxY(); 
            }

            // adjust the direction and movment vector
            adjustDirection();
            
            // set the new location and we're done.
            setNewLocation(newX, newY);
        }
    }