The 2D array would be looking like this. The 0's represent the open space, and 1's represent the block. Using getch() to recieve the move that user has made. If the next move is blocked, then stay still and wait for another move.
are u talking about RAT IN A MAZE problem...how will the user input the next move...cordinates at the console or click with the mouse..what's the objective actually..
In Turbo C++, there are clrscr(), getch(), and gotoxy() functions. With these functions, it enable us to write a mini-game with console. Using clrscr() to clear the whole screen, getch() to get input, and gotoxy() to change the coordinate.
You're still not giving the details. Hi Ali Sher, you need to give us the rules and other specifications to help us in helping you. If you're not interested, so am I.
we should take any special character like # for path finder .User can move this character by the help of arrow keys e.g. up, down, left and right.
Use ASCII characters for arrow keys’ handling.
After exit the character successfully your program should display a greeting message of success.