Added print board
This commit is contained in:
commit
4ad4eff06a
19
main.py
Normal file
19
main.py
Normal file
@ -0,0 +1,19 @@
|
||||
"""
|
||||
| |
|
||||
-|-|-
|
||||
| |
|
||||
-|-|-
|
||||
| |
|
||||
|
||||
"""
|
||||
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)
|
Loading…
Reference in New Issue
Block a user