This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def init(): | |
print("Welcome to tic tac toe!\nWe will start with choosing teams.") | |
one = input("Player 1, do you want to be O or X: ").upper() | |
one = one if one in ("O", "X") else "O" | |
two = "O" if one == "X" else "X" | |
board = [[" " for _ in range(3)] for _ in range(3)] | |
return one, two, board | |
def show(matrix, columns): | |
print(" 1 2 3 \n ---+---+---") |