当前位置:网站首页>Tkinter Huarong Road 4x4 tutorial II
Tkinter Huarong Road 4x4 tutorial II
2022-07-04 09:01:00 【Mh_ Python_ learn】
tkinter Game hua-rong-dao 4x4 Tutorial 2
The process :
1. Based on the design of huarongdao interface, the judgment algorithm of huarongdao digital buttons is completed .
2. Explain python Dictionary creation , Refresh , data structure .
3.tkinter Control and explanation of objects .
The goal is :
1. Can use dictionary to store object information .
2. Program to control the button movement of Huarong Road
In the last part of the design, we completed the design of huarongdao interface , And use class functions to create 16 Button objects , Now we want to think about how to make these objects move , The design idea of the program is to use the structure of the dictionary , Put the object name and the object's x,y coordinate , Stored with the text of the object
hrd = { object : [x,y, Numbers ]}
We can choose to initialize the dictionary when the game interface is just created , Then create a button object to add a dictionary
import tkinter as t
import random
from tkinter import messagebox
class btn:# Class function to create a separate huarongdao button
def
边栏推荐
- ArcGIS application (XXII) ArcMap loading lidar Las format data
- C language - Introduction - Foundation - syntax - data type (4)
- awk从入门到入土(5)简单条件匹配
- In depth investigation and Strategic Research Report on China's motion controller Market (2022 Edition)
- HMS core helps baby bus show high-quality children's digital content to global developers
- awk从入土到入门(10)awk内置函数
- GoLand environment variable configuration
- How can we make a monthly income of more than 10000? We media people with low income come and have a look
- 随机事件的关系与运算
- What is uid? What is auth? What is a verifier?
猜你喜欢
C language - Introduction - Foundation - syntax - [variable, constant light, scope] (V)
Codeforces Global Round 21(A-E)
地平线 旭日X3 PI (一)首次开机细节
Démarrage des microservices: passerelle
Awk from entry to earth (12) awk can also write scripts to replace the shell
C语言-入门-基础-语法-[标识符,关键字,分号,空格,注释,输入和输出](三)
How to re enable local connection when the network of laptop is disabled
【无标题】转发最小二乘法
4 small ways to make your Tiktok video clearer
Codeforces Round #793 (Div. 2)(A-D)
随机推荐
[attack and defense world | WP] cat
Codeforces Global Round 21(A-E)
Sequence model
Service call feign of "micro service"
保姆级JDEC增删改查练习
Use Alibaba cloud NPM image acceleration
After unplugging the network cable, does the original TCP connection still exist?
Explain TCP protocol in detail three handshakes and four waves
UML sequence diagram [easy to understand]
go-zero微服务实战系列(九、极致优化秒杀性能)
What is uid? What is auth? What is a verifier?
How do microservices aggregate API documents? This wave of show~
How college students choose suitable computers
Awk from entry to earth (7) conditional statements
HMS core helps baby bus show high-quality children's digital content to global developers
转:优秀的管理者,关注的不是错误,而是优势
How to solve the problem that computers often flash
Implementation principle of redis string and sorted set
A subclass must use the super keyword to call the methods of its parent class
"How to connect the Internet" reading notes - FTTH