Relative Content

Tag Archive for ctic-tac-toe

Check if 3 elements in an array are the same value

I am making a TicTacToe game (fairly easy I know but I am a beginner) and I am almost done, my problem now is I am trying to have it check if a row, a column or a diagonal of the table have the same value, and recursively keep playing if it is not. My board looks like this :

getch() replacement in C

I want and searching for an alternative that could replace the getch() function of C language. I want help if any any function which can replace the getch() function from the code below or an appropriate alternative. The conio.h header file is unavailable because I used the GNU GCC compiler but I don’t want to change compilers because it will be super long to wait.