当前位置:网站首页>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
边栏推荐
- 腾讯安卓开发面试,android开发的基础知识
- The "white paper on the panorama of the digital economy" has been released with great emphasis on the digitalization of insurance
- Selenium advanced operations
- 5. Wireless in vivo nano network: top ten "feasible?" problem
- Introduction of Xia Zhigang
- Social recruitment interview experience, 2022 latest Android high-frequency selected interview questions sharing
- POJ1149 PIGS 【最大流量】
- Microservice architecture debate between radical technologists vs Project conservatives
- 22-07-05 upload of qiniu cloud storage pictures and user avatars
- Jupyter launch didn't respond after Anaconda was installed & the web page was opened and ran without execution
猜你喜欢
随机推荐
Anaconda安裝後Jupyter launch 沒反應&網頁打開運行沒執行
腾讯字节阿里小米京东大厂Offer拿到手软,老师讲的真棒
Is it difficult for small and micro enterprises to make accounts? Smart accounting gadget quick to use
redisson bug分析
技术分享 | 抓包分析 TCP 协议
Period compression filter
Synchronization of data create trigger synchronization table for each site
腾讯安卓开发面试,android开发的基础知识
句号压缩过滤器
String length limit?
Wechat applet common collection
Configuration and simple usage of the EXE backdoor generation tool quasar
beegfs高可用模式探讨
HDU 1026 Ignatius and the Princess I 迷宫范围内的搜索剪枝问题
爬虫(14) - Scrapy-Redis分布式爬虫(1) | 详解
小微企业难做账?智能代账小工具快用起来
golang的超时处理使用技巧
HDU 1026 search pruning problem within the labyrinth of Ignatius and the prince I
深入浅出,面试突击版
Pay attention to the partners on the recruitment website of fishing! The monitoring system may have set you as "high risk of leaving"