import tkinter as tk import random import threading import time def boom(): window = tk.Tk() width = window.winfo_screenwidth() height = window.winfo_screenheight() a = random.randrange(0, width) b = random.randrange(0, height) window.title('就是玩') window.geometry("300x100" + "+" + str(a) + "+" + str(b)) tk.Label(window, text='你傻逼,你是大傻逼', bg='blue', font=('宋体', 17), width=30, height=4).pack() window.mainloop() threads = [] for i in range(999): t = threading.Thread(target=boom) threads.append(t) time.sleep(0.001) threads[i].start()
python 小游戏
最新推荐文章于 2024-06-14 09:50:01 发布