Hey guiys I've been learning to programme for a couple of weeks now and ive been working on the beginner challenges and I have a strange bug with the dungeon crawler exercise.
basically when I go to move the palyer out of bounds it oon the x axis its meant to reposition the player icon to the 0,0 position on the array but it doesnt it just randomly puts it elsewhere any suggestions to why this happens?
cout << "Welcome to the doungeon" << "\n\n";
cout << "The 'P' represents your position in the doungeon" <<endl;
cout << "The dots are blank spaces and the 'X' is your goal" << endl;
cout << "Use W A S D to move" << "\n\n";
playerFunctions plyob;
plyob.playerPos();
drawBoard();
while(win != 1){
cout << "\n\n" << "Which way would you like to move?" << endl;
cin >> playerMove;
plyob.playerMovement();
plyob.playerPos();
outOfBound();
plyob.playerPos();
clrScreen();
drawBoard();
winCond();
};
system("pause");
return 0;
}