I am making a tiktactoe and I have a problem with my player winning like the game even tho I dont get 3 in a row and I just get VIDEO << I didnt event get 3 in a row it just won the game for player 2
my buttons position
white = (250,250,250)
greenbutton2 = button((0,255,0),190,215,100,100, '2')
greenbutton3 = button((0,255,0),335,215,100,100, '3')
greenbutton4 = button((0,255,0),71,215,100,100, '4')
greenbutton5 = button((0,255,0),71,350,100,100, '5')
greenbutton6 = button((0,255,0),190,350,100,100, '6')
greenbutton7 = button((0,255,0),335,350,100,100, '7')
greenbutton8 = button((0,255,0),70,90,100,100, '8')
greenbutton9 = button((0,255,0),190,90,100,100, '9')
greenbutton10 = button((0,255,0),335,90,100,100, '10')
greenbutton4 = button((0,255,0),71,215,100,100, '4')
what I did for example for the first one is 215,215,215 if my partics are over those it should blit the winning image but it blits another image IMAGE but its not blitting the correct image instead its blitting this VIDEO << its the same for all of them it keeps blitting the wrong images and sometimes even though I dont get 3 in a row for the X player or the O enemy it will say I win is there a way I could fix this?
this is for my X player
# player 2 winning for the rows part
count = sum([1 if partic.y in [215, 215, 215] else 0 for partic in partics])
if count == 3:
lines.append(line(0,0,0,0,white))
count = sum([1 if partic.y in [90, 90, 90] else 0 for partic in partics])
if count == 3:
lines.append(lin(0,0,0,0,white))
count = sum([1 if partic.y in [350, 350, 350] else 0 for partic in partics])
if count == 3:
lines.append(liner(0,0,0,0,white))
count = sum([1 if partic.x in [335, 335, 335] else 0 for partic in partics])
if count == 3:
lines.append(low(0,0,0,0,white))
count = sum([1 if partic.x in [190, 190, 190] else 0 for partic in partics])
if count == 3:
lines.append(lowe(0,0,0,0,white))
count = sum([1 if partic.x in [71, 71, 70] else 0 for partic in partics])
if count == 3:
lines.append(lower(0,0,0,0,white))
count = sum([1 if partic.y in [90, 215, 350] else 0 for partic in partics])
if count == 3:
lines.append(win(0,0,0,0,white))
count = sum([1 if partic.x in [335, 71, 190] else 0 for partic in partics])
if count == 3:
lines.append(winner(0,0,0,0,white))
and this is for my O player
# player 1 winning for the rows part
count = sum([1 if parti.y in [215, 215, 215] else 0 for parti in parts])
if count == 3:
lines.append(line(0,0,0,0,white))
count = sum([1 if parti.y in [90, 90, 90] else 0 for parti in parts])
if count == 3:
lines.append(lin(0,0,0,0,white))
count = sum([1 if parti.y in [350, 350, 350] else 0 for parti in parts])
if count == 3:
lines.append(liner(0,0,0,0,white))
count = sum([1 if parti.x in [335, 335, 335] else 0 for parti in parts])
if count == 3:
lines.append(low(0,0,0,0,white))
count = sum([1 if parti.x in [190, 190, 190] else 0 for parti in parts])
if count == 3:
lines.append(lowe(0,0,0,0,white))
count = sum([1 if parti.x in [71, 71, 70] else 0 for parti in parts])
if count == 3:
lines.append(lower(0,0,0,0,white))
count = sum([1 if parti.y in [90, 215, 350] else 0 for parti in parts])
if count == 3:
lines.append(win(0,0,0,0,white))
count = sum([1 if parti.x in [335, 71, 190] else 0 for parti in parts])
if count == 3:
lines.append(winner(0,0,0,0,white))
my full code pastebin