当前位置:网站首页>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
边栏推荐
- Ideas and methods of system and application monitoring
- 5. 无线体内纳米网:十大“可行吗?”问题
- (3) Web security | penetration testing | basic knowledge of network security construction, IIS website construction, EXE backdoor generation tool quasar, basic use of
- Oceanbase Community Edition OBD mode deployment mode stand-alone installation
- Special topic of rotor position estimation of permanent magnet synchronous motor -- Summary of position estimation of fundamental wave model
- leetcode先刷_Maximum Subarray
- Alibaba数据源Druid可视化监控配置
- PowerPivot - DAX (first time)
- [cloud lesson] EI lesson 47 Mrs offline data analysis - processing OBS data through Flink
- Crawler (14) - scrape redis distributed crawler (1) | detailed explanation
猜你喜欢
rt-thread i2c 使用教程
腾讯T2大牛亲自讲解,跳槽薪资翻倍
Anaconda安装后Jupyter launch 没反应&网页打开运行没执行
Crawler (14) - scrape redis distributed crawler (1) | detailed explanation
Vscode debug run fluent message: there is no extension for debugging yaml. Should we find yaml extensions in the market?
腾讯T4架构师,android面试基础
[Yann Lecun likes the red stone neural network made by minecraft]
深入浅出,面试突击版
持续测试(CT)实战经验分享
某东短信登录复活 安装部署教程
随机推荐
【GET-4】
5. 无线体内纳米网:十大“可行吗?”问题
【计网】第三章 数据链路层(3)信道划分介质访问控制
Example of shutter text component
Appx code signing Guide
Linear distance between two points of cesium
范式的数据库具体解释
rt-thread i2c 使用教程
In simple terms, interview surprise Edition
BUUCTF---Reverse---easyre
Introduction of Xia Zhigang
Finally, there is no need to change a line of code! Shardingsphere native driver comes out
String length limit?
How to handle the timeout of golang
PHP与EXCEL PHPExcel
Problems encountered in using RT thread component fish
golang的超时处理使用技巧
RT-Thread 组件 FinSH 使用时遇到的问题
[cloud native and 5g] micro services support 5g core network
数字三角形模型 AcWing 1018. 最低通行费