Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while king_alive:
- global bot_turn
- if bot_turn:
- cells = l.bot_move(log_field)
- print(cells[0].x, cells[0].y, cells[1].x, cells[1].y)
- replace(cells[0], cells[1])
- bot_turn = False
- def replace(first_cell, second_cell):
- if second_cell.figure.type != 'nofig':
- delete_fig(second_cell.figure)
- first_cell.clicked = False
- second_cell.clicked = False
- second_cell.fig_name = first_cell.fig_name
- second_cell.fig_owner = first_cell.fig_owner
- second_cell.figure = second_cell.get_figure()
- first_cell.figure = l.NoFigure(first_cell.x, first_cell.y, "")
- first_cell.fig_name = ""
- first_cell.fig_owner = ""
- field[second_cell.x][second_cell.y].configure(fg=second_cell.fig_owner, text=second_cell.fig_name)
- field[first_cell.x][first_cell.y].configure(text="")
- demark_cells()
- Traceback (most recent call last):
- File "C:/Users/Даша/Desktop/python/task chess/graphics.py", line 176, in <module>
- main()
- File "C:/Users/Даша/Desktop/python/task chess/graphics.py", line 171, in main
- replace(cells[0], cells[1])
- File "C:/Users/Даша/Desktop/python/task chess/graphics.py", line 138, in replace
- field[second_cell.x][second_cell.y]['fg'] = second_cell.fig_owner
- File "C:Python34libtkinter__init__.py", line 1275, in __setitem__
- self.configure({key: value})
- File "C:Python34libtkinter__init__.py", line 1268, in configure
- return self._configure('configure', cnf, kw)
- File "C:Python34libtkinter__init__.py", line 1259, in _configure
- self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
- _tkinter.TclError: invalid command name ".36689776"
Add Comment
Please, Sign In to add comment