function [addToRow,addToCol] = move(moveParam)
% Associates a step within a matrix with the numbers 1-8
% Marcel Blais  CS99
% moveParam == 1 is a up, left move.  As moveParam steps up to the value 8
% the corresponding moves rotate clockwise.  moveParam == 8 corresponds to 
% a center, left move.
%                           1 2 3
%      Move Diagram:        8   4 
%                           7 6 5
%
% INPUTS:   moveParam is an integer between 1 and 8
% OUTPUTS:  [addToRow,addToCOl] is a vector whose entries are -1,0,or 1 to be
%           added to the indices of a matrix to move around in that matrix

if moveParam == 1       % up, left
    addToCol = -1;
    addToRow = -1;
elseif moveParam == 2   % up, center
    addToCol = 0;
    addToRow = -1;  
elseif moveParam == 3   % up, right
    addToCol = 1;
    addToRow = -1; 
elseif moveParam == 4   % center, right
    addToCol = 1;
    addToRow = 0; 
elseif moveParam == 5   % down, right
    addToCol = 1;
    addToRow = 1; 
elseif moveParam == 6   % down, center
    addToCol = 0;
    addToRow = 1;  
elseif moveParam == 7   % down, left
    addToCol = -1;
    addToRow = 1; 
elseif moveParam == 8   % center, left
    addToCol = -1;
    addToRow = 0;  
end