当前位置:网站首页>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 边栏推荐
- [C Advanced] file operation (2)
- What is inner connection and outer connection? What are the uses and benefits
- 09 softmax regression + loss function
- Explain TCP protocol in detail three handshakes and four waves
- HMS core helps baby bus show high-quality children's digital content to global developers
- UML 时序图[通俗易懂]
- Awk from entry to earth (15) awk executes external commands
- Launchpad x | mode
- What exactly is DAAS data as a service? Don't be misled by other DAAS concepts
- "How to connect the network" reading notes - Web server request and response (4)
猜你喜欢

埃氏筛+欧拉筛+区间筛

After unplugging the network cable, does the original TCP connection still exist?

How does Xiaobai buy a suitable notebook

AI Winter Olympics | is the future coming? Enter the entrance of the meta universe - virtual digital human

How to ensure the uniqueness of ID in distributed environment

Educational Codeforces Round 115 (Rated for Div. 2)

Codeforces Round #803 (Div. 2)(A-D)

System disk expansion in virtual machine

Mac platform forgets the root password of MySQL

From scratch, use Jenkins to build and publish pipeline pipeline project
随机推荐
[untitled] forwarding least square method
awk从入土到入门(10)awk内置函数
Codeforces Round #803 (Div. 2)(A-D)
20220701 Barbalat引理证明
Awk from entry to earth (7) conditional statements
C language - Introduction - Foundation - syntax - [main function, header file] (II)
什么是uid?什么是Auth?什么是验证器?
Reading notes on how to connect the network - tcp/ip connection (II)
Explain TCP protocol in detail three handshakes and four waves
There are 100 people eating 100 apples, one adult eating 4 apples, and four children eating 1 apple. How can they eat exactly 100 apples? Use any high-level language you are familiar with
UML 时序图[通俗易懂]
Xcode 6 swift code completion does not work properly - Xcode 6 swift code completion not working
Report on research and investment prospect prediction of China's electronic grade sulfuric acid industry (2022 Edition)
Educational Codeforces Round 115 (Rated for Div. 2)
Getting started with microservices: gateway gateway
Horizon sunrise X3 PI (I) first boot details
Awk from entry to earth (14) awk output redirection
awk从入门到入土(8)数组
What should I do if there is a problem with the graphics card screen on the computer
Industry depression has the advantages of industry depression