Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- from tkinter import ttk
- def click(row, col):
- if game_run and pole[row][col]['text'] == ' ':
- pole[row][col]['text'] = 'X'
- pole
- root = Tk()
- root.title("Hihihanki-hahanki")
- root.geometry("350x400")
- game_run = True
- pole = []
- for r in range(3):
- for c in range(3):
- button = ttk.Button()
- button.grid(row=r, column=c, ipadx=6, ipady=6, padx=6, pady=70)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement