Jan-03-2018, 09:37 PM
I am creating a Connect Four game and was wondering on how to create a function to determine if a player has won.
This is my board:
I have started with something like this:
Any suggestions?
This is my board:
"| | | | | | | |" "| | | | | | | |" "| | | | | | | |" "| | | | | | | |" "| | | | | | | |" "| | | | | | | |"The nth term between each counter space is 4n-2.
I have started with something like this:
def wincheck(alist): x=0 y=0 pos=(4*x)-2My board is stored as a 2d array, so the function will use that.
Any suggestions?