Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson10_diy3
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4dea09ea
authored
2 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
d784720f
c193482l1452p256a14562/wx836694
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
my_Tetris.py
my_Tetris.py
View file @
4dea09ea
...
...
@@ -35,8 +35,10 @@ while True:
screen
.
blit
(
background
,(
0
,
0
))
#画方块
pygame
.
draw
.
rect
(
screen
,(
255
,
0
,
0
),(
weizhi
[
1
]
*
20
-
20
,
weizhi
[
0
]
*
20
-
20
,
20
,
20
),
0
)
#在屏幕中weizhi[1]*20-20(x坐标),weizhi[0]*20-20(y坐标)的位置画出红色且内部填充(width=0)的20宽20高的正方形
pygame
.
draw
.
rect
(
screen
,(
255
,
255
,
255
),(
weizhi
[
1
]
*
20
-
20
,
weizhi
[
0
]
*
20
-
20
,
20
,
20
),
1
)
#在屏幕中weizhi[1]*20-20(x坐标),weizhi[0]*20-20(y坐标)的位置画出20宽20高的白色边框(width=1),为正方形的边框
pygame
.
draw
.
rect
(
screen
,(
255
,
0
,
0
),(
weizhi
[
1
]
*
20
-
20
,
weizhi
[
0
]
*
20
-
20
,
20
,
20
),
0
)
#在屏幕中weizhi[1]*20-20(x坐标),weizhi[0]*20-20(y坐标)的位置画出红色且内部填充(width=0)的20宽20高的正方形
pygame
.
draw
.
rect
(
screen
,(
255
,
255
,
255
),(
weizhi
[
1
]
*
20
-
20
,
weizhi
[
0
]
*
20
-
20
,
20
,
20
),
1
)
#在屏幕中weizhi[1]*20-20(x坐标),weizhi[0]*20-20(y坐标)的位置画出20宽20高的白色边框(width=1),为正方形的边框
# 得分
score_text
=
font
.
render
(
str
(
score
),
True
,(
0
,
0
,
0
))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment