MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / IsWinner

Function IsWinner

Tic_Tac_Toe/tic_tac_toe.py:31–41  ·  view source on GitHub ↗
(b,l)

Source from the content-addressed store, hash-verified

29
30
31def IsWinner(b,l):
32 return(
33 (b[1] == l and b[2] == l and b[3] == l) or
34 (b[4] == l and b[5] == l and b[6] == l) or
35 (b[7] == l and b[8] == l and b[9] == l) or
36 (b[1] == l and b[4] == l and b[7] == l) or
37 (b[2] == l and b[5] == l and b[8] == l) or
38 (b[3] == l and b[6] == l and b[9] == l) or
39 (b[1] == l and b[5] == l and b[9] == l) or
40 (b[3] == l and b[5] == l and b[7] == l)
41 )
42
43def playerMove():
44 run = True

Callers 3

computerMoveFunction · 0.85
TieGameFunction · 0.85
GamePlayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected