Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson12_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
f81e50e8
authored
Jul 29, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
2bb58355
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
my_Tetris.py
my_Tetris.py
View file @
f81e50e8
import
turtle
import
turtle
import
random
def
tree
(
n
):
def
tree
(
n
):
if
n
>=
5
0
:
if
n
>=
0
:
pen
.
fd
(
n
)
pen
.
fd
(
n
)
pen
.
rt
(
30
)
angle
=
random
.
randint
(
0
,
30
)
tree
(
n
-
50
)
length
=
random
.
randint
(
1
,
15
)
pen
.
lt
(
60
)
pen
.
rt
(
angle
)
tree
(
n
-
50
)
tree
(
n
-
10
)
pen
.
rt
(
30
)
pen
.
lt
(
2
*
angle
)
tree
(
n
-
10
)
pen
.
rt
(
angle
)
pen
.
up
()
pen
.
up
()
pen
.
bk
(
n
)
pen
.
bk
(
n
)
pen
.
down
()
pen
.
down
()
...
@@ -20,5 +22,5 @@ w = turtle.Screen()
...
@@ -20,5 +22,5 @@ w = turtle.Screen()
w
.
bgcolor
(
'wheat'
)
# wheat小麦
w
.
bgcolor
(
'wheat'
)
# wheat小麦
# 移动到起点
# 移动到起点
pen
.
lt
(
90
)
pen
.
lt
(
90
)
tree
(
1
5
0
)
tree
(
1
0
0
)
turtle
.
done
()
turtle
.
done
()
\ No newline at end of file
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