Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi..

I'm making a game called connect four, I wrote the code but I don't know how to complete it, I should do check for the winner vertical or horizontal, can anyone help me to write the code please....
Posted
Updated 11-May-16 13:29pm
v6
Comments
jeron1 11-May-16 18:03pm    
Are you asking how to evaluate Board[][] after a players turn to decide if someone has won?

1 solution

Quote:
How do I make check for the winner (C++)

There is not magic way to check for winner. You have to check all the possibilities.
Take advantage of your knowledge: if winner, the last token is part of it.

Think of how you would do to manually check. Think mechanically.
 
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