当前位置:网站首页>Catch ball game 1
Catch ball game 1
2022-07-06 20:11:00 【Melon eating crowd +1】
import pygame
# initialization
pygame.init()
# Create screen ( main window ), And return to the current screen
screen = pygame.display.set_mode((600,500))
pygame.display.set_caption(“ Catch games ”)
x,y=0,0
# Cycle through the screen ( display screen )
while True:
for event in pygame.event.get():
# If you close the window , Then quit the game
if event.type == pygame.QUIT:
pygame.quit()
# Press the keyboard KEYDOWN
if event.type == pygame.KEYDOWN:
print(‘abc’)
# The mouse click MOUSEBUTTONDOWN
# Fill color of main window
screen.fill((100,0,0))
# A circle ( canvas ,rgb Color ,xy Location , radius , Line width )
pygame.draw.circle(screen,(100,100,30),(x,y),30,0)
x+=1
y+=1
# Render the screen
pygame.display.update()
11
边栏推荐
- HDU 1026 search pruning problem within the labyrinth of Ignatius and the prince I
- HDU 1026 Ignatius and the Princess I 迷宫范围内的搜索剪枝问题
- 5. Nano - Net in wireless body: Top 10 "is it possible?" Questions
- HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
- 8086指令码汇总表(表格)
- 技术分享 | 抓包分析 TCP 协议
- [network planning] Chapter 3 data link layer (4) LAN, Ethernet, WLAN, VLAN
- 永磁同步电机转子位置估算专题 —— 基波模型类位置估算概要
- Enumeration gets values based on parameters
- 精彩编码 【进制转换】
猜你喜欢
The "white paper on the panorama of the digital economy" has been released with great emphasis on the digitalization of insurance
[cloud native and 5g] micro services support 5g core network
Classic 100 questions of algorithm interview, the latest career planning of Android programmers
Example of applying fonts to flutter
Information System Project Manager - Chapter VIII project quality management
22-07-05 upload of qiniu cloud storage pictures and user avatars
Le lancement du jupyter ne répond pas après l'installation d'Anaconda
B-杰哥的树(状压树形dp)
【Yann LeCun点赞B站UP主使用Minecraft制作的红石神经网络】
5. Wireless in vivo nano network: top ten "feasible?" problem
随机推荐
1805. Number of different integers in the string
Vscode debug run fluent message: there is no extension for debugging yaml. Should we find yaml extensions in the market?
Period compression filter
Linear distance between two points of cesium
01 基础入门-概念名词
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
Microservice architecture debate between radical technologists vs Project conservatives
Enumeration gets values based on parameters
PHP与EXCEL PHPExcel
B-杰哥的树(状压树形dp)
Initial experience of addresssanitizer Technology
Introduction to enterprise lean management system
Classic 100 questions of algorithm interview, the latest career planning of Android programmers
《数字经济全景白皮书》保险数字化篇 重磅发布
【云原生与5G】微服务加持5G核心网
5. Nano - Net in wireless body: Top 10 "is it possible?" Questions
腾讯T2大牛亲自讲解,跳槽薪资翻倍
夏志刚介绍
mod_ WSGI + pymssql path SQL server seat