Code Golf: Tic Tac Toe
Crazy Python solution – 79 characters max([b[x] for x in range(9) for y in range(x) for z in range(y) if x+y+z==12 and b[x]==b[y]==b[z]] + [0]) However, this assumes a different order for the board positions in b: 5 | 0 | 7 —+—+— 6 | 4 | 2 —+—+— 1 | 8 | 3 That … Read more