Ask coding questions

← Back to all posts
Connect 4 ignoring first row
reddevils1979

Everything seems to be working perfectly EXCEPT when I move should be placed in the first row it is looked at as an invalid move. It doesn't break the program, just keeps on asking the player for a different move. I have no idea why this is happening, so if anybody can lend a hand it would be appreciated.

Voters
reddevils1979
Comments
hotnewtop
MatthewADev

or you can call every column

MatthewADev

Hi, I recommend to make DEF for each one of them and assign them.
Example:
hi = input("Players Movement: ")
def s1():
print("You picked RIGHT!")
def s2():
print("You picked LEFT!")
if hi == "right":
s1()
elif hi == "left":
s2()