我在Python Tkinter中制作Tic Tac Toe游戏,但按钮是矩形,我希望它们的大小都是100x100像素。我尝试使用:
a1 = Button(root, text="", font="Helvetica 16 bold", command=a1, height=10, width=10)
(忽略空字符串和a1
)然后它不会将其调整为正方形。我已经编写了大部分代码,并且不想使用框架来调整它们的大小。我该怎么办?
答案 0 :(得分:4)
一种简单的方法是为按钮提供不可见的1x1像素图像。执行此操作时,width
和height
属性将被解释为像素(或更准确地说,屏幕单位,这也可能意味着点,英寸或厘米)。< / p>
如果这样做,您可以将compound
设置为值“c”,表示该按钮应同时显示文本和图像,两者都在窗口中心。
例如:
import Tkinter as tk
...
pixel = tk.PhotoImage(width=1, height=1)
button = tk.Button(root, text="", image=pixel, width=100, height=100, compound="c")
...
答案 1 :(得分:1)
我希望确保按钮是特定大小(以像素为单位)的方法是将该按钮放在框架内,并确保将框架设置为特定尺寸,并将按钮设置为填充该框架。 / p>
这可以轻松转换为在您的程序中工作,并确保按钮设置为100 x 100。
这是我所知道的唯一方法,以确保按钮的大小(以像素为单位)。可能还有其他选择。
首先我们需要2个清单。一个用于固定框架,一个用于固定按钮。这将允许我们以一种简单的方式存储框架和按钮,以便我们以后使用。
frames_list = []
btn_list = []
我不确定如何压缩你的check_win()
函数,所以我只会对它进行一些小改动,以便它可以与列表一起使用。我们需要将a1
,a2
,a3
等每个实例替换为按钮列表中的对应项,并使用for循环创建索引值
def check_win():
# Horizontal wins
if btn_list[0]["text"] == btn_list[1]["text"] == btn_list[2]["text"] == "X" or btn_list[0]["text"] == btn_list[1]["text"] == btn_list[2]["text"] == "O":
print("{} wins".format(btn_list[0]["text"]))
elif btn_list[3]["text"] == btn_list[4]["text"] == btn_list[5]["text"] == "X" or btn_list[3]["text"] == btn_list[4]["text"] == btn_list[5]["text"] == "O":
print("{} wins".format(btn_list[3]["text"]))
elif btn_list[6]["text"] == btn_list[7]["text"] == btn_list[8]["text"] == "X" or btn_list[6]["text"] == btn_list[7]["text"] == btn_list[8]["text"] == "O":
print("{} wins".format(btn_list[6]["text"]))
# Vertical wins
elif btn_list[0]["text"] == btn_list[3]["text"] == btn_list[6]["text"] == "X" or btn_list[0]["text"] == btn_list[3]["text"] == btn_list[6]["text"] == "O":
print("{} wins".format(btn_list[0]["text"]))
elif btn_list[1]["text"] == btn_list[4]["text"] == btn_list[7]["text"] == "X" or btn_list[1]["text"] == btn_list[4]["text"] == btn_list[7]["text"] == "O":
print("{} wins".format(btn_list[1]["text"]))
elif btn_list[2]["text"] == btn_list[5]["text"] == btn_list[8]["text"] == "X" or btn_list[2]["text"] == btn_list[5]["text"] == btn_list[8]["text"] == "O":
print("{} wins".format(btn_list[2]["text"]))
# Diagonal wins
elif btn_list[0]["text"] == btn_list[4]["text"] == btn_list[8]["text"] == "X" or btn_list[0]["text"] == btn_list[4]["text"] == btn_list[8]["text"] == "O":
print("{} wins".format(btn_list[0]["text"]))
elif btn_list[2]["text"] == btn_list[4]["text"] == btn_list[6]["text"] == "X" or btn_list[2]["text"] == btn_list[4]["text"] == btn_list[6]["text"] == "O":
print("{} wins".format(btn_list[2]["text"]))
# If no one wins
else:
change_turn()
然后我们需要更改process_turn()
函数以包含按钮列表中每个按钮的索引值,所以像这样添加一个参数。
def process_turn(ndex): # index argument being sent by buttons
btn_list[ndex].config(text=turn) # changed text at index of list.
check_win()
最后,我们需要在命令中创建具有正确索引的所有按钮,我们可以使用for循环执行此操作。好2循环。
第一个循环将启动行计数,第二个for循环将启动列计数。这创造了我们3乘3的网格。 ndex
变量用于跟踪每个按钮需要在按钮列表上配置的索引。
def create_frames_and_buttons():
ndex = 0
i = 0
x = 0
for i in range(3):
for x in range(3):
frames_list.append(Frame(root, width = 100, height = 100))
frames_list[ndex].propagate(False)
frames_list[ndex].grid(row = i, column = x, sticky = "nsew", padx = 2, pady = 2) # add any padding you would like to space out the frames/buttons
btn_list.append(Button(frames_list[ndex], text="", font="Helvetica 16 bold",
command = lambda ndex=ndex: process_turn(ndex)))
btn_list[ndex].pack(expand=True, fill=BOTH)
x += 1
ndex += 1
i += 1
root.resizable(width=False, height=False)
create_frames_and_buttons()
所有这些都让你拥有了这个代码,它具有您想要的100x100像素大小。
看一下下面的例子:
from tkinter import *
root = Tk()
frames_list = []
btn_list = []
turn = "X"
turnLabel = Label(root, text=turn, font="Helvetica 16 bold")
turnLabel.grid(row=3, columnspan=3)
def change_turn():
global turn
if turn == "O":
turn = "X"
turnLabel.config(text=turn)
elif turn == "X":
turn = "O"
turnLabel.config(text=turn)
def check_win():
# Horizontal wins
if btn_list[0]["text"] == btn_list[1]["text"] == btn_list[2]["text"] == "X" or btn_list[0]["text"] == btn_list[1]["text"] == btn_list[2]["text"] == "O":
print("{} wins".format(btn_list[0]["text"]))
elif btn_list[3]["text"] == btn_list[4]["text"] == btn_list[5]["text"] == "X" or btn_list[3]["text"] == btn_list[4]["text"] == btn_list[5]["text"] == "O":
print("{} wins".format(btn_list[3]["text"]))
elif btn_list[6]["text"] == btn_list[7]["text"] == btn_list[8]["text"] == "X" or btn_list[6]["text"] == btn_list[7]["text"] == btn_list[8]["text"] == "O":
print("{} wins".format(btn_list[6]["text"]))
# Vertical wins
elif btn_list[0]["text"] == btn_list[3]["text"] == btn_list[6]["text"] == "X" or btn_list[0]["text"] == btn_list[3]["text"] == btn_list[6]["text"] == "O":
print("{} wins".format(btn_list[0]["text"]))
elif btn_list[1]["text"] == btn_list[4]["text"] == btn_list[7]["text"] == "X" or btn_list[1]["text"] == btn_list[4]["text"] == btn_list[7]["text"] == "O":
print("{} wins".format(btn_list[1]["text"]))
elif btn_list[2]["text"] == btn_list[5]["text"] == btn_list[8]["text"] == "X" or btn_list[2]["text"] == btn_list[5]["text"] == btn_list[8]["text"] == "O":
print("{} wins".format(btn_list[2]["text"]))
# Diagonal wins
elif btn_list[0]["text"] == btn_list[4]["text"] == btn_list[8]["text"] == "X" or btn_list[0]["text"] == btn_list[4]["text"] == btn_list[8]["text"] == "O":
print("{} wins".format(btn_list[0]["text"]))
elif btn_list[2]["text"] == btn_list[4]["text"] == btn_list[6]["text"] == "X" or btn_list[2]["text"] == btn_list[4]["text"] == btn_list[6]["text"] == "O":
print("{} wins".format(btn_list[2]["text"]))
# If no one wins
else:
change_turn()
def process_turn(ndex):
btn_list[ndex].config(text=turn)
check_win()
def create_frames_and_buttons():
ndex = 0
i = 0
x = 0
for i in range(3):
for x in range(3):
frames_list.append(Frame(root, width = 100, height = 100))
frames_list[ndex].propagate(False)
frames_list[ndex].grid(row = i, column = x, sticky = "nsew", padx = 2, pady = 2)
btn_list.append(Button(frames_list[ndex], text="", font="Helvetica 16 bold",
command = lambda ndex=ndex: process_turn(ndex)))
btn_list[ndex].pack(expand=True, fill=BOTH)
x += 1
ndex += 1
i += 1
root.resizable(width=False, height=False)
create_frames_and_buttons()
root.mainloop()
结果:
答案 2 :(得分:1)
如果要使用place方法添加按钮,则可以使用表达式:
myButton.place(x = 0, y = 0, width = 200, height = 30)
使用此按钮,将在其父对象中200x30 px
位置创建大小为x = 0, y = 0
的按钮
答案 3 :(得分:0)
这是使用自适应算法完成的代码(因此它从错误中学习)。在回答你的问题时,我使用了画布并创建了矩形,然后点击了它。
DRAW_WEIGHT = 1 # The value for a round where there was a draw
COMPUTER_WIN_WEIGHT = 5 # The value for a round where there was a computer win
COMPUTER_LOSE_WEIGHT = -5 # The value for a round where there was a computer loss
LOG = True # Rounds be logged to improve move knowledge
import ctypes, math, threading, random, os, time, os.path
from tkinter import *
def end (mode, at = None):
global active, facts
active = False
if mode == 0: l.config (text = "Draw")
elif mode == 1:
if player == -1: l.config (text = "You lose")
else: l.config (text = "Player 1 wins")
else:
if player == -1: l.config (text = "Well done! You win!")
else: l.config (text = "Player 2 wins")
if player == -1:
log [-1].append (mode)
if LOG:
with open ("Learn.log", "w") as f: f.write ("\n".join ([" ".join ([str (j) for j in i]) for i in log]))
else:
with open ("Learn.log", "w") as f: f.write ("\n".join ([" ".join ([str (j) for j in i]) for i in log [ : -1]]))
if at:
if at [0] == 0: c.create_line (at [1] * 200 + 100, 0, at [1] * 200 + 100, 600, width = 5, fill = "blue")
elif at [0] == 1: c.create_line (0, at [1] * 200 + 100, 600, at [1] * 200 + 100, width = 5, fill = "blue")
elif at [0] == 2: c.create_line (0, 0, 600, 600, width = 5, fill = "blue")
else: c.create_line (600, 0, 0, 600, width = 5, fill = "blue")
c.create_text (300, 250, text = "Game Over", fill = "red", font = ("times", 75))
c.create_text (300, 325, text = "Click to play again", fill = "red", font = ("times", 30))
c.bind ("<Button-1>", restart)
def restart (event = None):
global places, player
c.delete (ALL)
places = [0 for i in range (9)]
for i in range (2): c.create_line (200 + 200 * i, 0, 200 + 200 * i, 600, width = 2)
for i in range (2): c.create_line (0, 200 + 200 * i, 600, 200 + 200 * i, width = 2)
if player == -1:
l.config (text = "Click on a square to go there")
c.bind ("<Button-1>", lambda event: threading.Thread (target = click, args = (event,)).start ())
else:
player = True
l.config (text = "Player 1's turn")
c.bind ("<Button-1>", lambda event: threading.Thread (target = p2click, args = (event,)).start ())
def check (mode = False):
toGo = (-1,)
for i in range (3):
now = [places [i + j * 3] for j in range (3)]
if now.count (1) == 3:
toGo = (0, i)
break
if toGo [0] == -1:
for i in range (3):
now = [places [j + i * 3] for j in range (3)]
if now.count (1) == 3:
toGo = (1, i)
break
if toGo [0] == -1:
now = [places [i + i * 3] for i in range (3)]
if now.count (1) == 3: toGo = (2,)
if toGo [0] == -1:
now = [places [2 + i * 3 - i] for i in range (3)]
if now.count (1) == 3: toGo = (3,)
if toGo [0] == -1:
for i in range (3):
now = [places [i + j * 3] for j in range (3)]
if now.count (2) == 3:
toGo = (0, i)
break
if toGo [0] == -1:
for i in range (3):
now = [places [j + i * 3] for j in range (3)]
if now.count (2) == 3:
toGo = (1, i)
break
if toGo [0] == -1:
now = [places [i + i * 3] for i in range (3)]
if now.count (2) == 3: toGo = (2,)
if toGo [0] == -1:
now = [places [2 + i * 3 - i] for i in range (3)]
if now.count (2) == 3: toGo = (3,)
if toGo [0] == -1:
if mode: end (0)
else: return True
else: end (1, toGo)
else: end (2, toGo)
return False
def click (event):
global log, active, facts
c.bind ("<Button-1>", lambda event: None)
start = time.clock ()
l.config (text = "Calculating...")
x, y = math.floor (event.x / 200), math.floor (event.y / 200)
if x == 3: x -= 1
if y == 3: y -= 1
if places [x + y * 3] == 0:
if places.count (0) == 9:
log.append ([x + y * 3])
active = True
else: log [-1].append (x + y * 3)
places [x + y * 3] = 1
c.create_line (x * 200 + 25, y * 200 + 25, x * 200 + 175, y * 200 + 175, width = 2)
c.create_line (x * 200 + 25, y * 200 + 175, x * 200 + 175, y * 200 + 25, width = 2)
toGo, movesChecked = -1, 0
if places.count (0) == 0: check (True)
else:
if check ():
for i in range (3):
movesChecked += 1
now = [places [i + j * 3] for j in range (3)]
if now.count (2) == 2 and now.count (0) == 1:
toGo = i + now.index (0) * 3
break
if toGo == -1:
for i in range (3):
movesChecked += 1
now = [places [j + i * 3] for j in range (3)]
if now.count (2) == 2 and now.count (0) == 1:
toGo = now.index (0) + i * 3
break
if toGo == -1:
movesChecked += 1
now = [places [i + i * 3] for i in range (3)]
if now.count (2) == 2 and now.count (0) == 1: toGo = now.index (0) + now.index (0) * 3
if toGo == -1:
movesChecked += 1
now = [places [2 + i * 3 - i] for i in range (3)]
if now.count (2) == 2 and now.count (0) == 1: toGo = 2 + now.index (0) * 3 - now.index (0)
if toGo == -1:
for i in range (3):
movesChecked += 1
now = [places [i + j * 3] for j in range (3)]
if now.count (1) == 2 and now.count (0) == 1:
toGo = i + now.index (0) * 3
break
if toGo == -1:
for i in range (3):
movesChecked += 1
now = [places [j + i * 3] for j in range (3)]
if now.count (1) == 2 and now.count (0) == 1:
toGo = now.index (0) + i * 3
break
if toGo == -1:
movesChecked += 1
now = [places [i + i * 3] for i in range (3)]
if now.count (1) == 2 and now.count (0) == 1: toGo = now.index (0) + now.index (0) * 3
if toGo == -1:
movesChecked += 1
now = [places [2 + i * 3 - i] for i in range (3)]
if now.count (1) == 2 and now.count (0) == 1: toGo = 2 + now.index (0) * 3 - now.index (0)
if toGo == -1:
useful = [0, 0, 0, 0, 0, 0, 0, 0, 0]
for rot in range (4):
for i in range (len (log) - 1):
movesChecked += 1
this = rotate (log [i], rot)
if len (log [i]) > len (log [-1]):
if log [-1] == this [ : len (log [-1])]:
if this [-1] == 0: value = DRAW_WEIGHT
elif this [-1] == 1: value = COMPUTER_WIN_WEIGHT
else: value = COMPUTER_LOSE_WEIGHT
useful [this [len (log [-1])]] += value
toGo = useful.index (max (useful))
while places [toGo] != 0:
movesChecked += 1
useful [toGo] = min (useful) - 1
toGo = useful.index (max (useful))
places [toGo] = 2
log [-1].append (toGo)
c.create_oval (toGo % 3 * 200 + 25, math.floor (toGo / 3) * 200 + 25, toGo % 3 * 200 + 175, math.floor (toGo / 3) * 200 + 175, width = 2)
facts = [round ((time.clock () - start) * 1000, 1), movesChecked]
facts.append (round (facts [1] / facts [0]))
if check ():
l.config (text = "Your turn")
c.bind ("<Button-1>", lambda event: threading.Thread (target = click, args = (event,)).start ())
else:
l.config (text = "This square has already been taken.")
c.bind ("<Button-1>", lambda event: threading.Thread (target = click, args = (event,)).start ())
def nerdyFacts ():
t = Toplevel ()
t.focus_force ()
t.resizable (False, False)
if os.path.isfile ("icon.ico"): t.iconbitmap ("icon.ico")
if len (facts) > 0: Label (t, text = "Just a few facts about the last move should you wish to know them:\n%sms taken to process request\n%s possible moves checked\n%s moves checked per ms" % tuple (facts)).pack ()
else: Label (t, text = "No facts to display.").pack ()
def rotate (data, mode):
if mode == 0: replace = [i for i in range (9)]
elif mode == 1: replace = [2, 5, 8, 1, 4, 7, 0, 3, 6]
elif mode == 2: replace = [8, 7, 6, 5, 4, 3, 2, 1, 0]
else: replace = [6, 3, 0, 7, 4, 1, 8, 5, 2]
return [replace [i] for i in data [ : -1]] + [data [-1]]
def remove ():
global log
if ctypes.windll.user32.MessageBoxW (0, "Do you really want to delete all of my data.\nIn doing so, I will not be able to make such informed moves.\nOn average, I say it takes about 20 rounds for me to start getting better.\nThis is only recommended if the program takes a long time to make moves.", "Naughts and crosses", 4) == 6:
if active: del log [ : -1]
else: log = []
with open ("Learn.log", "w") as f: f.write ("")
t.destroy ()
ctypes.windll.user32.MessageBoxW (0, "Data reset.", "Naughts and crosses", 0)
def p2click (event):
global player
x, y = math.floor (event.x / 200), math.floor (event.y / 200)
if x == 3: x -= 1
if y == 3: y -= 1
if places [x + y * 3] == 0:
places [x + y * 3] = int (player) + 1
if player:
c.create_line (x * 200 + 25, y * 200 + 25, x * 200 + 175, y * 200 + 175, width = 2)
c.create_line (x * 200 + 25, y * 200 + 175, x * 200 + 175, y * 200 + 25, width = 2)
else: c.create_oval (x * 200 + 25, y * 200 + 25, x * 200 + 175, y * 200 + 175, width = 2)
l.config (text = "Player %s's turn" % str (int (player) + 1))
player = not player
if places.count (0) == 0: check (True)
else: check ()
def start (players):
global player
if players == 1:
player = -1
t = Label (root, text = "Data information", font = ("times", 12))
t.pack ()
t.bind ("<Button-1>", lambda event: threading.Thread (target = dataLog).start ())
else: player = True
restart ()
def dataLog ():
global t
t = Toplevel ()
t.resizable (False, False)
t.focus_force ()
if os.path.isfile ("icon.ico"): t.iconbitmap ("icon.ico")
if active: l = log [ : -1]
else: l = log
if len (l) == 0: Label (t, text = "I have no data to analyse.\nTherefore, I cannot display any extra information.").pack ()
else:
wins, loses, draws = 0, 0, 0
for i in l:
if i [-1] == 0: draws += 1
elif i [-1] == 1: loses += 1
else: wins += 1
wins, loses, draws = round (wins * 100 / len (l)), round (loses * 100 / len (l)), round (draws * 100 / len (l))
last = math.ceil (len (l) / 2)
last_wins, last_loses, last_draws = 0, 0, 0
if last > 50: last = 50
for i in l [len (l) - last : ]:
if i [-1] == 0: last_draws += 1
elif i [-1] == 1: last_loses += 1
else: last_wins += 1
last_wins, last_loses, last_draws = round (last_wins * 100 / last), round (last_loses * 100 / last), round (last_draws * 100 / last)
Label (t, text = "I have %s round/s of data to analyse.\n(%s virtual rounds)\n\nOf these:\n%s%s are user wins\n%s%s are computer wins\n%s%s are draws\n\nIn the last %s round/s:\n%s%s are user wins\n%s%s are computer wins\n%s%s are draws\n" % (len (l), len (l) * 4, wins, "%", loses, "%", draws, "%", last, last_wins, "%", last_loses, "%", last_draws, "%")).pack ()
Button (t, text = "Clear data", command = lambda: threading.Thread (target = remove).start ()).pack ()
active, facts = False, ()
if os.path.isfile ("Learn.log"):
with open ("Learn.log") as f:
read = f.read ()
if read != "": log = [[int (j) for j in i.split (" ")] for i in read.split ("\n")]
else: log = []
else: log = []
try: ctypes.windll.shcore.SetProcessDpiAwareness (True)
except: pass
root = Tk ()
root.title ("Naughts and crosses")
root.resizable (False, False)
if os.path.isfile ("icon.ico"): root.iconbitmap ("icon.ico")
l = Label (root, text = "", font = ("times", 20))
l.bind ("<Button-1>", lambda event: nerdyFacts ())
l.pack ()
c = Canvas (root, width = 600, height = 600, bg = "white")
c.pack ()
c.create_text (300, 200, text = "How many players are there?", font = ("times", 30))
p1 = (c.create_rectangle (150, 350, 250, 450, fill = "blue"),
c.create_text (200, 400, text = "1", font = ("times", 40), fill = "red"))
p2 = (c.create_rectangle (350, 350, 450, 450, fill = "red"),
c.create_text (400, 400, text = "2", font = ("times", 40), fill = "blue"))
for i in p1: c.tag_bind (i, "<ButtonRelease-1>", lambda event: start (1))
for i in p2: c.tag_bind (i, "<ButtonRelease-1>", lambda event: start (2))
root.mainloop ()
一般来说,我说它应该让你在它变得更好之前玩大约50场比赛(或者你可以使用下面的数据,我已经玩了几轮并将其保存到一个名为learn.log
的文件中):
1 0 7 4 8 6 2 3 1
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
3 2 0 6 4 5 8 2
1 0 8 2 7 4 6 2
1 0 8 3 6 7 2 5 4 2
1 2 6 0 7 4 8 2
1 3 6 0 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