Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson10_diy2
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
42172b98
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
c8c34133
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
my_Tetris.py
my_Tetris.py
View file @
42172b98
...
@@ -20,6 +20,7 @@ font = pygame.font.Font('STKAITI.TTF', 60) # 字体
...
@@ -20,6 +20,7 @@ font = pygame.font.Font('STKAITI.TTF', 60) # 字体
center
=
[
2
,
8
]
center
=
[
2
,
8
]
curr_shape
=
[(
0
,
-
1
),(
0
,
0
),(
0
,
1
),(
-
1
,
0
)]
curr_shape
=
[(
0
,
-
1
),(
0
,
0
),(
0
,
1
),(
-
1
,
0
)]
curr_1
=
[(
0
,
-
1
),(
0
,
0
),(
0
,
1
),(
0
,
2
)]
while
True
:
while
True
:
...
@@ -39,7 +40,7 @@ while True:
...
@@ -39,7 +40,7 @@ while True:
# 将背景图画上去
# 将背景图画上去
screen
.
blit
(
background
,(
0
,
0
))
screen
.
blit
(
background
,(
0
,
0
))
curr_poss
=
[]
curr_poss
=
[]
for
cube
in
curr_
shape
:
for
cube
in
curr_
1
:
aa
=
(
cube
[
0
]
+
center
[
0
],
cube
[
1
]
+
center
[
1
])
aa
=
(
cube
[
0
]
+
center
[
0
],
cube
[
1
]
+
center
[
1
])
curr_poss
.
append
(
aa
)
curr_poss
.
append
(
aa
)
for
cube
in
curr_poss
:
for
cube
in
curr_poss
:
...
...
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