function [reward,nextCP] = MovementProperty(currentCP,OptionTaken)
%MOVEMENTPROPERTY Summary of this function goes here
%   Detailed explanation goes here
    switch currentCP
        case 1
            if OptionTaken==1
                nextCP = 4;
                reward = -1;
            elseif OptionTaken==2
                nextCP = 7;
                reward = 10;
            else
                nextCP = 5;
                reward = -1;
            end
        case 2
            if OptionTaken==1
                nextCP = 7;
                reward = 10;
            elseif OptionTaken==2
                nextCP = 6;
                reward = -1;
            else
                nextCP = 4;
                reward = -1;
            end    

        case 3
            if OptionTaken==1
                nextCP = 6;
                reward = -1;
            elseif OptionTaken==2
                nextCP = 5;
                reward = -1;
            else
                nextCP = 7;
                reward = 10;
            end
        case 4
            if OptionTaken==1
                nextCP = 2;
                reward = -2;
            elseif OptionTaken==2
                nextCP = 1;
                reward = -1;
            else
                nextCP = 4;
                reward = -100;
            end
       case 5
            if OptionTaken==1
                nextCP = 3;
                reward = -2;
            elseif OptionTaken==2
                nextCP = 5;
                reward = -100;
            else
                nextCP = 1;
                reward = -1;
            end
       case 6
            if OptionTaken==1
                nextCP = 6;
                reward = -100;
            elseif OptionTaken==2
                nextCP =2;
                reward = -2;
            else
                nextCP = 3;
                reward = -1;
            end
        otherwise
            disp('Out of range')
    end
end

