Advertisement
k1alo

11111111

Dec 8th, 2023
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. from tkinter import *
  2. from tkinter import ttk
  3.  
  4. def click(row, col):
  5.     if game_run and pole[row][col]['text'] == ' ':
  6.         pole[row][col]['text'] = 'X'
  7.         pole
  8.  
  9.  
  10.  
  11. root = Tk()
  12. root.title("Hihihanki-hahanki")
  13. root.geometry("350x400")
  14. game_run = True
  15. pole = []
  16.  
  17.  
  18.  
  19.  
  20.  
  21. for r in range(3):
  22.     for c in range(3):
  23.         button = ttk.Button()
  24.         button.grid(row=r, column=c, ipadx=6, ipady=6, padx=6, pady=70)
  25.  
  26.  
  27.  
  28. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement