Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson12_diy4
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
094adec8
authored
2 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
21b4f5b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
my_Tetris.py
s8514oem.fon
my_Tetris.py
View file @
094adec8
...
@@ -19,7 +19,7 @@ clock = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
...
@@ -19,7 +19,7 @@ clock = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
# 载入素材
# 载入素材
background
=
pygame
.
image
.
load
(
'bg.png'
)
background
=
pygame
.
image
.
load
(
'bg.png'
)
font
=
pygame
.
font
.
Font
(
'STKAITI.TTF'
,
60
)
font
=
pygame
.
font
.
Font
(
'STKAITI.TTF'
,
60
)
font_new
=
pygame
.
font
.
Font
(
'STKAITI.TTF'
,
2
5
)
# 字体
font_new
=
pygame
.
font
.
Font
(
'STKAITI.TTF'
,
3
5
)
# 字体
# 俄罗斯方块所有形状
# 俄罗斯方块所有形状
O
=
[[(
0
,
0
),
(
0
,
1
),
(
1
,
0
),
(
1
,
1
)]]
O
=
[[(
0
,
0
),
(
0
,
1
),
(
1
,
0
),
(
1
,
1
)]]
...
@@ -153,7 +153,7 @@ while True:
...
@@ -153,7 +153,7 @@ while True:
screen
.
blit
(
text_surface
,
(
350
,
70
))
screen
.
blit
(
text_surface
,
(
350
,
70
))
if
gameover
==
True
:
if
gameover
==
True
:
test
=
font_new
.
render
(
'GAME OVER'
,
True
,(
0
,
0
,
0
))
test
=
font_new
.
render
(
'GAME OVER'
,
True
,(
0
,
0
,
0
))
screen
.
blit
(
test
,(
20
,
25
0
))
screen
.
blit
(
test
,(
100
,
22
0
))
score
=
0
score
=
0
num
=
[]
num
=
[]
for
i
in
range
(
25
):
for
i
in
range
(
25
):
...
...
This diff is collapsed.
Click to expand it.
s8514oem.fon
0 → 100644
View file @
094adec8
File added
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