I make x,o game between two players and it is run but, please i want to know how i make this game between one player and the computer?
please i want an urgent reply..

10 Years
Discussion Span
Last Post by nomas90

sorry i need it in c++ programming language and i searched in the forum but i didn't find this question so, please i want an urgent reply


One way to about it would be to enter randomly either a 'X' or an 'O' at every turn of the computer. But this solution would not be very smart.

Another method could be exhausting all the possible states of the matrix by using conditional statements and then determining the best move. But this solution would be very lengthy.

You can probably check the extreme positions and if any one of them consists of the mark of the same type, then place that mark, if not then place randomly.


please can u write this part in c++ code to understand what u are saying more?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.