当前位置:网站首页>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 边栏推荐
- The basic syntax of mermaid in typera
- 《网络是怎么样连接的》读书笔记 - 认识网络基础概念(一)
- Ehrlich sieve + Euler sieve + interval sieve
- System disk expansion in virtual machine
- GoLand environment variable configuration
- Cancel ctrl+alt+delete when starting up
- Basic operations of databases and tables ----- view data tables
- awk从入门到入土(5)简单条件匹配
- awk从入门到入土(9)循环语句
- 【无标题】转发最小二乘法
猜你喜欢
![Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources](/img/f9/6c97697896cd1bd0f1d62542959f29.jpg)
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources

What if I forget the router password

What if the wireless network connection of the laptop is unavailable

How can we make a monthly income of more than 10000? We media people with low income come and have a look

System disk expansion in virtual machine

Explain TCP protocol in detail three handshakes and four waves

Nurse level JDEC addition, deletion, modification and inspection exercise

Getting started with microservices: gateway gateway

Relationship and operation of random events

User login function: simple but difficult
随机推荐
awk从入门到入土(8)数组
[attack and defense world | WP] cat
From scratch, use Jenkins to build and publish pipeline pipeline project
The old-fashioned synchronized lock optimization will make it clear to you at once!
Research Report on the current market situation and development prospects of calcium sulfate whiskers in China (2022 Edition)
Reading notes on how to connect the network - hubs, routers and routers (III)
Sword finger offer 30 contains the stack of Min function
std::is_ union,std::is_ class,std::integral_ constant
Bishi blog (13) -- oral arithmetic test app
上周热点回顾(6.27-7.3)
Service call feign of "micro service"
What should I do if there is a problem with the graphics card screen on the computer
Report on research and investment prospect prediction of China's electronic grade sulfuric acid industry (2022 Edition)
Use Alibaba cloud NPM image acceleration
Nurse level JDEC addition, deletion, modification and inspection exercise
Leetcode topic [array] - 121 - the best time to buy and sell stocks
微服務入門:Gateway網關
Awk from entry to penetration (6) regular matching
awk从入门到入土(9)循环语句
HMS core helps baby bus show high-quality children's digital content to global developers