Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson3_diy1
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
4aa4d8b5
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
30bcd6a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
0 deletions
apple.png
snake.py
apple.png
View file @
4aa4d8b5
2.05 KB
|
W:
|
H:
1.44 KB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
snake.py
View file @
4aa4d8b5
...
@@ -47,6 +47,7 @@ while True:
...
@@ -47,6 +47,7 @@ while True:
elif
setheading
==
"down"
:
elif
setheading
==
"down"
:
y
+=
30
y
+=
30
if
(
x
,
y
)
==
(
apple_x
,
apple_y
):
if
(
x
,
y
)
==
(
apple_x
,
apple_y
):
print
()
apple_x
=
30
*
random
.
randint
(
0
,
20
)
apple_x
=
30
*
random
.
randint
(
0
,
20
)
apple_y
=
30
*
random
.
randint
(
0
,
16
)
apple_y
=
30
*
random
.
randint
(
0
,
16
)
else
:
else
:
...
...
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