当前位置:网站首页>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 边栏推荐
- go-zero微服务实战系列(九、极致优化秒杀性能)
- What should I do if there is a problem with the graphics card screen on the computer
- C语言-入门-基础-语法-[主函数,头文件](二)
- Service call feign of "micro service"
- Cancel ctrl+alt+delete when starting up
- Opencv environment construction (I)
- [attack and defense world | WP] cat
- Reading notes on how to connect the network - hubs, routers and routers (III)
- Four essential material websites for we media people to help you easily create popular models
- Research Report on the current market situation and development prospects of calcium sulfate whiskers in China (2022 Edition)
猜你喜欢

How to play dapr without kubernetes?

std::is_ union,std::is_ class,std::integral_ constant

Jianzhi offer 09 realizes queue with two stacks
![C language - Introduction - Foundation - syntax - [operators, type conversion] (6)](/img/3f/4d8f4c77d9fde5dd3f53ef890ecfa8.png)
C language - Introduction - Foundation - syntax - [operators, type conversion] (6)
](/img/3f/4d8f4c77d9fde5dd3f53ef890ecfa8.png)
C語言-入門-基礎-語法-[運算符,類型轉換](六)

地平线 旭日X3 PI (一)首次开机细节

【无标题】转发最小二乘法

Educational Codeforces Round 115 (Rated for Div. 2)

Explain TCP protocol in detail three handshakes and four waves

How to solve the problem that computers often flash
随机推荐
Trim leading or trailing characters from strings- Trim leading or trailing characters from a string?
C language - Introduction - Foundation - syntax - [variable, constant light, scope] (V)
awk从入门到入土(11)awk getline函数详解
[C Advanced] file operation (2)
保姆级JDEC增删改查练习
UML 时序图[通俗易懂]
Horizon sunrise X3 PI (I) first boot details
C語言-入門-基礎-語法-[運算符,類型轉換](六)
Go zero micro service practical series (IX. ultimate optimization of seckill performance)
[untitled] forwarding least square method
awk从入门到入土(7)条件语句
随机事件的关系与运算
awk从入门到入土(8)数组
C语言-入门-基础-语法-[运算符,类型转换](六)
Manjaro install wechat
The map set type is stored in the form of key value pairs, and the iterative traversal is faster than the list set
Comparison between sentinel and hystrix
什么是uid?什么是Auth?什么是验证器?
Report on research and investment prospects of polyglycolic acid industry in China (2022 Edition)
Awk from entry to soil (5) simple condition matching