Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys, I am developing tic tac toe game. For Computer moves I have used random no functions. But the problem is, it does not make the challenge hard enough to keep player away from win.
I need help to develop an algorithm, so that, computer will play to win.
Posted

And? You came with a question but not specific on whats stopping you.

For now, look at this article: Tic Tac Toe Implemented in C# with Computer Player[^]

To add on, for best possible move, look at this algo: Minimax Explained[^]
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900