this one piece of code has me going nutz.. I'm essentially trying to predict the next move..
everything is based in columns and rows for a 2 dimensional array.. do I define the current positon to the possible future position. the program later checks to make sure the position is acceptable then print the maze etc.. bolded area is the part where I'm stuck.
Code:
const int ROW_SIZE = 20, COL_SIZE = 17;
void printMaze(char [][COL_SIZE], char *, char);
bool isMoveLegal(char );
int _tmain(int argc, _TCHAR* argv[])
{
char board[ROW_SIZE][COL_SIZE] = maze text here..
char *position;
position = &board[1][1];
char symbol='^';
while (!GetAsyncKeyState(VK_ESCAPE) && *position != 'X')
{
printMaze(board, position, symbol);
char *nextPosition = position;
if (GetAsyncKeyState(VK_UP))
{
symbol = '^';
// not complete need to update
}
else if (GetAsyncKeyState(VK_DOWN))
{
etc........etc.. etc............