Tic-Tac-Toe/main.py

19 lines
315 B
Python
Raw Normal View History

2020-12-20 01:53:52 +01:00
"""
| |
-|-|-
| |
-|-|-
| |
"""
def print_board(state):
board = ""+ state[0] +"|"+ state[1] +"|"+ state[2] +" \n-|-|-\n"+ state[3] +"|"+ state[4] +"|"+ state[5] +"\n-|-|-\n"+ state[6] +"|"+ state[7] +"|"+ state[8] +"\n"
print(board)
state = list(" "*9)
print_board(state)
state[0] = "X"
print_board(state)