commit 4ad4eff06a593122ccfbb156a7f58f47c824be3e Author: Paulina Nowak Date: Sun Dec 20 01:53:52 2020 +0100 Added print board diff --git a/main.py b/main.py new file mode 100644 index 0000000..4f1d2ac --- /dev/null +++ b/main.py @@ -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) \ No newline at end of file