当前位置:网站首页>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
边栏推荐
- Mantis creates users without password options
- Clion console output Chinese garbled code
- Educational Codeforces Round 115 (Rated for Div. 2)
- awk从入门到入土(8)数组
- 【无标题】转发最小二乘法
- 20220701 barbarat lemma proof
- Codeforces Round #750 (Div. 2)(A,B,C,D,F1)
- Jianzhi offer 09 realizes queue with two stacks
- awk从入门到入土(4)用户自定义变量
- Cancel ctrl+alt+delete when starting up
猜你喜欢
埃氏筛+欧拉筛+区间筛
Educational Codeforces Round 119 (Rated for Div. 2)
Four essential material websites for we media people to help you easily create popular models
Explain TCP protocol in detail three handshakes and four waves
C language - Introduction - Foundation - syntax - [identifier, keyword, semicolon, space, comment, input and output] (III)
Solve the problem of "Chinese garbled MySQL fields"
How do microservices aggregate API documents? This wave of show~
【无标题】转发最小二乘法
Target detection -- intensive reading of yolov3 paper
到底什么才是DaaS数据即服务?别再被其他DaaS概念给误导了
随机推荐
Educational Codeforces Round 119 (Rated for Div. 2)
Report on research and investment prospects of polyglycolic acid industry in China (2022 Edition)
没有Kubernetes怎么玩Dapr?
Lauchpad X | 模式
How can we make a monthly income of more than 10000? We media people with low income come and have a look
Educational Codeforces Round 115 (Rated for Div. 2)
Launpad | basic knowledge
Implementation principle of redis string and sorted set
Mantis creates users without password options
Use Alibaba cloud NPM image acceleration
How to re enable local connection when the network of laptop is disabled
awk从入土到入门(10)awk内置函数
Leetcode topic [array] -136- numbers that appear only once
C language - Introduction - Foundation - syntax - [main function, header file] (II)
How college students choose suitable computers
Awk from entry to earth (14) awk output redirection
C语言-入门-基础-语法-[变量,常亮,作用域](五)
Manjaro install wechat
User login function: simple but difficult
System disk expansion in virtual machine