Do you guys have a good tactic to tackle different possible events of input? It wasn't that bad putting in 'if' statements for every single possible situation in "Tic Tac Toe". But when it comes to Connect four, it's a different case. If I have to put in 'if' statements for every possible event here, it's gonna be a nightmare of grinding code.
Example:
1 2 3 4 5
If(input == pos1 && input == pos2 && input == pos3 && input == pos4){
Player X wins
}
This is bad. If you have a better solution please post.
look at the char checkwinner() function.(line 1 of second post) It is very inefficient, but it works. I have requested a better way in that post, but yet to get an anwser. I was actually looking for an answer when I saw your question. Hope this helps!