Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2798 commits
Select commit Hold shift + click to select a range
0f9fb27
New translations step_5.md (English)
sashamishcheriakova Feb 21, 2025
3e06463
New translations step_5.md (Portuguese, Brazilian)
sashamishcheriakova Feb 21, 2025
cd89779
New translations step_5.md (Marathi)
sashamishcheriakova Feb 21, 2025
12c041c
New translations step_5.md (Hindi)
sashamishcheriakova Feb 21, 2025
4eae3b9
New translations step_5.md (Welsh)
sashamishcheriakova Feb 21, 2025
fcb7c4e
New translations step_5.md (Kannada)
sashamishcheriakova Feb 21, 2025
5ed8a73
New translations step_5.md (Spanish, Latin America)
sashamishcheriakova Feb 21, 2025
69e2e61
New translations step_6.md (French)
sashamishcheriakova Feb 21, 2025
5026942
New translations step_6.md (Arabic)
sashamishcheriakova Feb 21, 2025
ae5a6a2
New translations step_6.md (Greek)
sashamishcheriakova Feb 21, 2025
670be3a
New translations step_6.md (Italian)
sashamishcheriakova Feb 21, 2025
03bccec
New translations step_6.md (Japanese)
sashamishcheriakova Feb 21, 2025
bea5b48
New translations step_6.md (Dutch)
sashamishcheriakova Feb 21, 2025
912e521
New translations step_6.md (Polish)
sashamishcheriakova Feb 21, 2025
840654a
New translations step_6.md (Russian)
sashamishcheriakova Feb 21, 2025
596fb66
New translations step_6.md (Ukrainian)
sashamishcheriakova Feb 21, 2025
c829fa6
New translations step_6.md (English)
sashamishcheriakova Feb 21, 2025
80c55dd
New translations step_6.md (Portuguese, Brazilian)
sashamishcheriakova Feb 21, 2025
c036260
New translations step_6.md (Marathi)
sashamishcheriakova Feb 21, 2025
907fc75
New translations step_6.md (Hindi)
sashamishcheriakova Feb 21, 2025
7f42525
New translations step_6.md (Welsh)
sashamishcheriakova Feb 21, 2025
368314e
New translations step_6.md (Kannada)
sashamishcheriakova Feb 21, 2025
5499d1a
New translations step_6.md (Spanish, Latin America)
sashamishcheriakova Feb 21, 2025
7e3bbc1
New translations step_7.md (French)
sashamishcheriakova Feb 21, 2025
a309e55
New translations step_7.md (Arabic)
sashamishcheriakova Feb 21, 2025
063ffc6
New translations step_7.md (Greek)
sashamishcheriakova Feb 21, 2025
17ea027
New translations step_7.md (Italian)
sashamishcheriakova Feb 21, 2025
5347a67
New translations step_7.md (Japanese)
sashamishcheriakova Feb 21, 2025
13b3448
New translations step_7.md (Dutch)
sashamishcheriakova Feb 21, 2025
2959e2e
New translations step_7.md (Polish)
sashamishcheriakova Feb 21, 2025
65e799f
New translations step_7.md (Russian)
sashamishcheriakova Feb 21, 2025
fd27e0f
New translations step_7.md (Ukrainian)
sashamishcheriakova Feb 21, 2025
c6a0d94
New translations step_7.md (English)
sashamishcheriakova Feb 21, 2025
d3f70df
New translations step_7.md (Portuguese, Brazilian)
sashamishcheriakova Feb 21, 2025
47387e8
New translations step_7.md (Marathi)
sashamishcheriakova Feb 21, 2025
facc7dd
New translations step_7.md (Hindi)
sashamishcheriakova Feb 21, 2025
b406d9f
New translations step_7.md (Welsh)
sashamishcheriakova Feb 21, 2025
fdc54f8
New translations step_7.md (Kannada)
sashamishcheriakova Feb 21, 2025
26a9b9a
New translations step_7.md (Spanish, Latin America)
sashamishcheriakova Feb 21, 2025
51f69ff
New translations step_8.md (French)
sashamishcheriakova Feb 21, 2025
691e70e
New translations step_8.md (Arabic)
sashamishcheriakova Feb 21, 2025
432126e
New translations step_8.md (Greek)
sashamishcheriakova Feb 21, 2025
2468b39
New translations step_8.md (Italian)
sashamishcheriakova Feb 21, 2025
5a7a626
New translations step_8.md (Japanese)
sashamishcheriakova Feb 21, 2025
2751022
New translations step_8.md (Dutch)
sashamishcheriakova Feb 21, 2025
6e1d873
New translations step_8.md (Polish)
sashamishcheriakova Feb 21, 2025
3405558
New translations step_8.md (Russian)
sashamishcheriakova Feb 21, 2025
b5aaa41
New translations step_8.md (Ukrainian)
sashamishcheriakova Feb 21, 2025
1e95837
New translations step_8.md (English)
sashamishcheriakova Feb 21, 2025
fbc9add
New translations step_8.md (Portuguese, Brazilian)
sashamishcheriakova Feb 21, 2025
91c3303
New translations step_8.md (Marathi)
sashamishcheriakova Feb 21, 2025
98ea890
New translations step_8.md (Hindi)
sashamishcheriakova Feb 21, 2025
6a988ee
New translations step_8.md (Welsh)
sashamishcheriakova Feb 21, 2025
cc2b62c
New translations step_8.md (Kannada)
sashamishcheriakova Feb 21, 2025
b1d0fdc
New translations step_8.md (Spanish, Latin America)
sashamishcheriakova Feb 21, 2025
6cfed4b
New translations main.py (French)
sashamishcheriakova Feb 21, 2025
71c5a15
New translations main.py (Arabic)
sashamishcheriakova Feb 21, 2025
10f7d3e
New translations main.py (Greek)
sashamishcheriakova Feb 21, 2025
7459879
New translations main.py (Italian)
sashamishcheriakova Feb 21, 2025
0222baf
New translations main.py (Japanese)
sashamishcheriakova Feb 21, 2025
c68f3f7
New translations main.py (Dutch)
sashamishcheriakova Feb 21, 2025
de37021
New translations main.py (Polish)
sashamishcheriakova Feb 21, 2025
2633f1c
New translations main.py (Russian)
sashamishcheriakova Feb 21, 2025
89e8a34
New translations main.py (Ukrainian)
sashamishcheriakova Feb 21, 2025
b0cd354
New translations main.py (English)
sashamishcheriakova Feb 21, 2025
ac48bb0
New translations main.py (Portuguese, Brazilian)
sashamishcheriakova Feb 21, 2025
e18a9a0
New translations main.py (Marathi)
sashamishcheriakova Feb 21, 2025
3a43168
New translations main.py (Hindi)
sashamishcheriakova Feb 21, 2025
a716d38
New translations main.py (Welsh)
sashamishcheriakova Feb 21, 2025
8c0e373
New translations main.py (Kannada)
sashamishcheriakova Feb 21, 2025
f42c535
New translations main.py (Spanish, Latin America)
sashamishcheriakova Feb 21, 2025
0e89328
New translations python-comments.txt (French)
sashamishcheriakova Feb 21, 2025
531c384
New translations python-comments.txt (Arabic)
sashamishcheriakova Feb 21, 2025
79b1f78
New translations python-comments.txt (Greek)
sashamishcheriakova Feb 21, 2025
8e02d16
New translations python-comments.txt (Italian)
sashamishcheriakova Feb 21, 2025
ed665f6
New translations python-comments.txt (Japanese)
sashamishcheriakova Feb 21, 2025
a176368
New translations python-comments.txt (Dutch)
sashamishcheriakova Feb 21, 2025
ec55729
New translations python-comments.txt (Polish)
sashamishcheriakova Feb 21, 2025
098610d
New translations python-comments.txt (Russian)
sashamishcheriakova Feb 21, 2025
4b7e5c6
New translations python-comments.txt (Ukrainian)
sashamishcheriakova Feb 21, 2025
5af13d4
New translations python-comments.txt (English)
sashamishcheriakova Feb 21, 2025
01bd6d7
New translations python-comments.txt (Portuguese, Brazilian)
sashamishcheriakova Feb 21, 2025
243aab5
New translations python-comments.txt (Marathi)
sashamishcheriakova Feb 21, 2025
45a6499
New translations python-comments.txt (Hindi)
sashamishcheriakova Feb 21, 2025
95069ad
New translations python-comments.txt (Welsh)
sashamishcheriakova Feb 21, 2025
7fbb5f2
New translations python-comments.txt (Kannada)
sashamishcheriakova Feb 21, 2025
599e0a4
New translations python-comments.txt (Spanish, Latin America)
sashamishcheriakova Feb 21, 2025
506f292
New translations python-translatable.txt (French)
sashamishcheriakova Feb 21, 2025
953219b
New translations python-translatable.txt (Arabic)
sashamishcheriakova Feb 21, 2025
52d9a9b
New translations python-translatable.txt (Greek)
sashamishcheriakova Feb 21, 2025
0c82dd5
New translations python-translatable.txt (Italian)
sashamishcheriakova Feb 21, 2025
4f7d8ba
New translations python-translatable.txt (Japanese)
sashamishcheriakova Feb 21, 2025
4e91b68
New translations python-translatable.txt (Dutch)
sashamishcheriakova Feb 21, 2025
2a277d1
New translations python-translatable.txt (Polish)
sashamishcheriakova Feb 21, 2025
36d2efe
New translations python-translatable.txt (Russian)
sashamishcheriakova Feb 21, 2025
dc0b0f1
New translations python-translatable.txt (Ukrainian)
sashamishcheriakova Feb 21, 2025
e171bd5
New translations python-translatable.txt (English)
sashamishcheriakova Feb 21, 2025
854f4c3
New translations python-translatable.txt (Portuguese, Brazilian)
sashamishcheriakova Feb 21, 2025
bc5e37b
New translations python-translatable.txt (Marathi)
sashamishcheriakova Feb 21, 2025
0e5ac34
New translations python-translatable.txt (Hindi)
sashamishcheriakova Feb 21, 2025
3581e31
New translations python-translatable.txt (Welsh)
sashamishcheriakova Feb 21, 2025
238dc6b
New translations python-translatable.txt (Kannada)
sashamishcheriakova Feb 21, 2025
a80df72
New translations python-translatable.txt (Spanish, Latin America)
sashamishcheriakova Feb 21, 2025
83bdff3
New translations main.py (Dutch)
sashamishcheriakova Feb 21, 2025
a7bf94b
New translations meta.yml (French)
sashamishcheriakova Apr 6, 2025
9d7bd8e
New translations step_1.md (French)
sashamishcheriakova Apr 6, 2025
4ba8e9c
New translations step_1.md (Arabic)
sashamishcheriakova Apr 6, 2025
b714e16
New translations step_1.md (Greek)
sashamishcheriakova Apr 6, 2025
623b0cc
New translations step_1.md (Italian)
sashamishcheriakova Apr 6, 2025
87724e9
New translations step_1.md (Japanese)
sashamishcheriakova Apr 6, 2025
bea35f4
New translations step_1.md (Dutch)
sashamishcheriakova Apr 6, 2025
044cc2b
New translations step_1.md (Polish)
sashamishcheriakova Apr 6, 2025
2ec7ca9
New translations step_1.md (Russian)
sashamishcheriakova Apr 6, 2025
fa60128
New translations step_1.md (Ukrainian)
sashamishcheriakova Apr 6, 2025
1cda2fb
New translations step_1.md (English)
sashamishcheriakova Apr 6, 2025
44f5313
New translations step_1.md (Portuguese, Brazilian)
sashamishcheriakova Apr 6, 2025
e1aad7f
New translations step_1.md (Marathi)
sashamishcheriakova Apr 6, 2025
bca39e2
New translations step_1.md (Hindi)
sashamishcheriakova Apr 6, 2025
c886ccc
New translations step_1.md (Welsh)
sashamishcheriakova Apr 6, 2025
1ecd6a8
New translations step_1.md (Kannada)
sashamishcheriakova Apr 6, 2025
8d44e88
New translations step_1.md (Spanish, Latin America)
sashamishcheriakova Apr 6, 2025
ed187be
New translations step_2.md (French)
sashamishcheriakova Apr 6, 2025
aa78360
New translations step_3.md (French)
sashamishcheriakova Apr 6, 2025
19c47e3
New translations step_4.md (French)
sashamishcheriakova Apr 6, 2025
e0b86ba
New translations step_5.md (French)
sashamishcheriakova Apr 6, 2025
5d83f87
New translations step_6.md (French)
sashamishcheriakova Apr 6, 2025
7b0d616
New translations step_7.md (French)
sashamishcheriakova Apr 6, 2025
d189b57
New translations step_8.md (French)
sashamishcheriakova Apr 6, 2025
74f7aaf
New translations python-comments.txt (French)
sashamishcheriakova Apr 6, 2025
fb6ec18
New translations python-translatable.txt (French)
sashamishcheriakova Apr 6, 2025
fb06ec5
New translations main.py (French)
sashamishcheriakova Apr 6, 2025
bf23847
New translations main.py (French)
sashamishcheriakova Apr 6, 2025
43c13ee
New translations main.py (Arabic)
sashamishcheriakova Apr 6, 2025
1eb1ded
New translations main.py (Greek)
sashamishcheriakova Apr 6, 2025
8c43d7f
New translations main.py (Italian)
sashamishcheriakova Apr 6, 2025
ab8d949
New translations main.py (Japanese)
sashamishcheriakova Apr 6, 2025
caeed97
New translations main.py (Dutch)
sashamishcheriakova Apr 6, 2025
ba378a2
New translations main.py (Polish)
sashamishcheriakova Apr 6, 2025
8138d51
New translations main.py (Russian)
sashamishcheriakova Apr 6, 2025
c569cf1
New translations main.py (Ukrainian)
sashamishcheriakova Apr 6, 2025
ded98b2
New translations main.py (English)
sashamishcheriakova Apr 6, 2025
24b7774
New translations main.py (Portuguese, Brazilian)
sashamishcheriakova Apr 6, 2025
baf53b6
New translations main.py (Marathi)
sashamishcheriakova Apr 6, 2025
8083715
New translations main.py (Hindi)
sashamishcheriakova Apr 6, 2025
53417e7
New translations main.py (Welsh)
sashamishcheriakova Apr 6, 2025
49a4efa
New translations main.py (Kannada)
sashamishcheriakova Apr 6, 2025
cd54bae
New translations main.py (Spanish, Latin America)
sashamishcheriakova Apr 6, 2025
be51a43
New translations main.py (French)
sashamishcheriakova Apr 6, 2025
685bd81
New translations main.py (French)
sashamishcheriakova Apr 6, 2025
c5570f5
New translations project_config.yml (French)
sashamishcheriakova Apr 6, 2025
7abf7e4
New translations main.py (French)
sashamishcheriakova Apr 6, 2025
86d10bd
New translations project_config.yml (French)
sashamishcheriakova Apr 6, 2025
59d7a82
New translations main.py (French)
sashamishcheriakova Apr 6, 2025
8c2fe59
New translations banner.png (German)
sashamishcheriakova May 1, 2025
f5c5af4
New translations collision.png (German)
sashamishcheriakova May 1, 2025
be46007
New translations complex-obstacles.png (German)
sashamishcheriakova May 1, 2025
032448c
New translations example1.png (German)
sashamishcheriakova May 1, 2025
58cc412
New translations example2.png (German)
sashamishcheriakova May 1, 2025
a1f482c
New translations example3.png (German)
sashamishcheriakova May 1, 2025
e1cbe2d
New translations example4.png (German)
sashamishcheriakova May 1, 2025
5dc614b
New translations example5.png (German)
sashamishcheriakova May 1, 2025
f08f6a8
New translations face_player.png (German)
sashamishcheriakova May 1, 2025
f58d9ce
New translations kek-project.png (German)
sashamishcheriakova May 1, 2025
24e2857
New translations move-and-detect.gif (German)
sashamishcheriakova May 1, 2025
a35336e
New translations obstacles.png (German)
sashamishcheriakova May 1, 2025
f554356
New translations projects_row.png (German)
sashamishcheriakova May 1, 2025
22d8ec1
New translations score.png (German)
sashamishcheriakova May 1, 2025
90489d2
New translations share-button.png (German)
sashamishcheriakova May 1, 2025
5bc6fa1
New translations showcase_projects.png (German)
sashamishcheriakova May 1, 2025
3bd054e
New translations starter-images.png (German)
sashamishcheriakova May 1, 2025
3b19383
New translations theme-turtle.png (German)
sashamishcheriakova May 1, 2025
d4fe4b7
New translations tree_obstacle.png (German)
sashamishcheriakova May 1, 2025
2146112
New translations meta.yml (German)
sashamishcheriakova May 1, 2025
364c16d
New translations meta.yml (Dutch)
sashamishcheriakova May 1, 2025
4929e9d
New translations question_1.md (German)
sashamishcheriakova May 1, 2025
979528f
New translations question_2.md (German)
sashamishcheriakova May 1, 2025
3b4d54b
New translations question_3.md (German)
sashamishcheriakova May 1, 2025
5115a31
New translations step_1.md (German)
sashamishcheriakova May 1, 2025
9af0769
New translations step_1.md (Dutch)
sashamishcheriakova May 1, 2025
ac7c2c8
New translations step_2.md (German)
sashamishcheriakova May 1, 2025
d8194bd
New translations step_2.md (Dutch)
sashamishcheriakova May 1, 2025
a298a05
New translations step_3.md (German)
sashamishcheriakova May 1, 2025
ee4bf72
New translations step_3.md (Dutch)
sashamishcheriakova May 1, 2025
afb160b
New translations step_4.md (German)
sashamishcheriakova May 1, 2025
0860c00
New translations step_4.md (Dutch)
sashamishcheriakova May 1, 2025
46656d3
New translations step_5.md (German)
sashamishcheriakova May 1, 2025
75de0df
New translations step_5.md (Dutch)
sashamishcheriakova May 1, 2025
84de798
New translations step_6.md (German)
sashamishcheriakova May 1, 2025
68c288d
New translations step_6.md (Dutch)
sashamishcheriakova May 1, 2025
9917639
New translations step_7.md (German)
sashamishcheriakova May 1, 2025
5921dcc
New translations step_7.md (Dutch)
sashamishcheriakova May 1, 2025
f971645
New translations step_8.md (German)
sashamishcheriakova May 1, 2025
f45bd6b
New translations step_8.md (Dutch)
sashamishcheriakova May 1, 2025
534b7d5
New translations step_9.md (German)
sashamishcheriakova May 1, 2025
30a8d7b
New translations python-comments.txt (German)
sashamishcheriakova May 1, 2025
474373f
New translations python-comments.txt (Dutch)
sashamishcheriakova May 1, 2025
075fda1
New translations python-translatable.txt (German)
sashamishcheriakova May 1, 2025
e8cc858
New translations python-translatable.txt (Dutch)
sashamishcheriakova May 1, 2025
e61a16e
New translations astronaut1.png (German)
sashamishcheriakova May 1, 2025
e787616
New translations astronaut2.png (German)
sashamishcheriakova May 1, 2025
efa0d3b
New translations earth.png (German)
sashamishcheriakova May 1, 2025
7dda50d
New translations flowers.png (German)
sashamishcheriakova May 1, 2025
e7c6f7e
New translations iss.png (German)
sashamishcheriakova May 1, 2025
7993de9
New translations main.py (German)
sashamishcheriakova May 1, 2025
94bef87
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
a3ae2c5
New translations moon.png (German)
sashamishcheriakova May 1, 2025
98da861
New translations planet1.png (German)
sashamishcheriakova May 1, 2025
fc5edec
New translations planet2.png (German)
sashamishcheriakova May 1, 2025
d311014
New translations project_config.yml (German)
sashamishcheriakova May 1, 2025
f003477
New translations rocket1.png (German)
sashamishcheriakova May 1, 2025
43b0b4a
New translations rocket2.png (German)
sashamishcheriakova May 1, 2025
c468cf3
New translations shark.png (German)
sashamishcheriakova May 1, 2025
8359dd8
New translations tree.png (German)
sashamishcheriakova May 1, 2025
e415be1
New translations treefeller.png (German)
sashamishcheriakova May 1, 2025
acbfa29
New translations turtle.png (German)
sashamishcheriakova May 1, 2025
6ce12a9
New translations main.py (German)
sashamishcheriakova May 1, 2025
f42cf8b
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
5ba2c15
New translations project_config.yml (German)
sashamishcheriakova May 1, 2025
0b5d058
New translations car.png (German)
sashamishcheriakova May 1, 2025
3d5d982
New translations main.py (German)
sashamishcheriakova May 1, 2025
32e39eb
New translations project_config.yml (German)
sashamishcheriakova May 1, 2025
1df8e92
New translations main.py (German)
sashamishcheriakova May 1, 2025
677fbf8
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
d49aa58
New translations moon.png (German)
sashamishcheriakova May 1, 2025
1c405a4
New translations project_config.yml (German)
sashamishcheriakova May 1, 2025
f4c3a20
New translations rocket.png (German)
sashamishcheriakova May 1, 2025
6bf4a73
New translations main.py (German)
sashamishcheriakova May 1, 2025
45ca766
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
f7537ed
New translations project_config.yml (German)
sashamishcheriakova May 1, 2025
4811dea
New translations fallenover.png (German)
sashamishcheriakova May 1, 2025
377f58e
New translations main.py (German)
sashamishcheriakova May 1, 2025
3b4678c
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
9e06418
New translations project_config.yml (German)
sashamishcheriakova May 1, 2025
58c33d8
New translations project_config.yml (Dutch)
sashamishcheriakova May 1, 2025
1e73094
New translations skiing.png (German)
sashamishcheriakova May 1, 2025
636b7b1
New translations step_2.md (French)
sashamishcheriakova May 1, 2025
043ec6b
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
0303b0f
New translations main.py (French)
sashamishcheriakova May 1, 2025
95511e4
New translations main.py (French)
sashamishcheriakova May 1, 2025
b4d285a
New translations main.py (French)
sashamishcheriakova May 1, 2025
66f031d
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
f449714
New translations main.py (French)
sashamishcheriakova May 1, 2025
9ec7cde
New translations main.py (French)
sashamishcheriakova May 1, 2025
0816954
New translations step_1.md (French)
sashamishcheriakova May 1, 2025
224cd67
New translations main.py (French)
sashamishcheriakova May 1, 2025
46202d0
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
3b6ac24
New translations main.py (French)
sashamishcheriakova May 1, 2025
12d21ad
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
8d8c6a0
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
11e0ae7
New translations main.py (Dutch)
sashamishcheriakova May 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added ar-SA/code/dont-collide-starter/astronaut1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/astronaut2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/earth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/flowers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/iss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions ar-SA/code/dont-collide-starter/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from p5 import *
from random import randint, seed

# Include global variables here
screen_size = 400

# Draw player function goes here



# Draw obstacles function goes here


def setup():
# Put code to run once here
size(screen_size, screen_size)
text_size(40)


def draw():
# Put code to run every frame here



# Keep this to run your code
run()
Binary file added ar-SA/code/dont-collide-starter/moon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/planet1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/planet2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions ar-SA/code/dont-collide-starter/project_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: "Don't Collide!"
identifier: "dont-collide-starter"
type: "python"
Binary file added ar-SA/code/dont-collide-starter/rocket1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/rocket2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/shark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/treefeller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/code/dont-collide-starter/turtle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 129 additions & 0 deletions ar-SA/code/dont_collide_avoid_germs_example/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
from p5 import *
from random import randint, seed

level = 1
score = 0


def safe_player():
global player_y

# Face
fill(200, 134, 145)
ellipse(mouse_x, player_y, 60, 60)

# Eyes
fill(178, 200, 145)
ellipse(mouse_x - 10, player_y - 10, 20, 20)
ellipse(mouse_x + 10, player_y - 10, 20, 20)
fill(0)
ellipse(mouse_x - 10, player_y - 10, 10, 10)
ellipse(mouse_x + 10, player_y - 10, 10, 10)
fill(255)
ellipse(mouse_x - 12, player_y - 12, 5, 5)
ellipse(mouse_x + 12, player_y - 12, 5, 5)

# Mouth
fill(0)
ellipse(mouse_x, player_y + 10, 15, 10)
fill(200, 134, 145)
ellipse(mouse_x, player_y + 5, 10, 10)


def crashed_player():
global player_y

# Face
fill(178, 200, 145)
ellipse(mouse_x, player_y, 60, 60)

# Eyes
fill(149, 161, 195)
ellipse(mouse_x - 10, player_y - 10, 20, 20)
ellipse(mouse_x + 10, player_y - 10, 20, 20)
fill(0)
ellipse(mouse_x - 10, player_y - 10, 10, 10)
ellipse(mouse_x + 10, player_y - 10, 10, 10)
fill(255)
ellipse(mouse_x - 12, player_y - 12, 5, 5)
ellipse(mouse_x + 12, player_y - 12, 5, 5)

# Mouth
fill(0)
ellipse(mouse_x, player_y + 15, 15, 10)
fill(178, 200, 145)
ellipse(mouse_x, player_y + 20, 10, 10)


def draw_player():

global player_y, safe, score, level

player_y = int(height * 0.8)

collide = get(mouse_x, player_y).hex
collide2 = get(mouse_x, player_y + 30).hex
collide3 = get(mouse_x + 30, player_y).hex
collide4 = get(mouse_x, player_y - 30).hex

if mouse_x < width: # off the left of the screen
collide2 = safe.hex

if mouse_x > width: # off the right of the screen
collide3 = safe.hex

# print(collide, collide2, collide3, collide4)

if (
collide == safe.hex
and collide2 == safe.hex
and collide3 == safe.hex
and collide4 == safe.hex
):
safe_player()
score += level
else: # Collided
crashed_player()
level = 0


def draw_obstacles():
global level

seed(41143644)

if frame_count & height == height - 1 and level < 5:
level += 1
print("You reached level", level)

for i in range(9 + level):
ob_x = randint(0, width)
ob_y = randint(0, height) + frame_count
ob_y %= height
text("🦠", ob_x, ob_y)


def setup():
# Put code to run once here
size(400, 400) # width and height
no_stroke()
text_size(40)
text_align(CENTER, TOP)


def draw():
# Put code to run every frame here
global safe, score, level

safe = Color(149, 161, 195)

if level > 0:
background(safe)
fill(145, 134, 126)
text("Score: " + str(score), width / 2, 20)
draw_obstacles()
draw_player()


# Keep this to run your code
run()
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: "Don't Collide: Avoid the Germs"
identifier: "avoid-germs-example"
type: 'python'
Binary file added ar-SA/code/dont_collide_clean_car_example/car.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions ar-SA/code/dont_collide_clean_car_example/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/python3

# Import library code
from p5 import *
from random import randint, seed

level = 1
score = 0

# The draw_obstacle function goes here
def draw_obstacles():
global level

seed(123456789)

if frame_count % width == width - 1 and level < 10:
level += 1
print('You reached level', level)

for i in range(6 + level):
ob_x = randint(0, width) - (frame_count * level)
ob_y = randint(0, height)
ob_x %= width # wrap around
text('💩', ob_x, ob_y)

# The draw_player function goes here
def draw_player():
global score, level

player_x = int(width * 0.2)
player_y = mouse_y

collide = get(player_x + 50, player_y + 15).hex
collide2 = get(player_x + 50, player_y - 15).hex
collide3 = get(player_x, player_y + 15).hex
collide4 = get(player_x, player_y - 15).hex
collide5 = get(player_x - 50, player_y + 15).hex
collide6 = get(player_x - 50, player_y - 15).hex

if player_y > height - 18: # Off the bottom of the screen
collide = safe.hex
collide3 = safe.hex
collide5 = safe.hex

elif player_y < 18: # Off the top of the screen
collide2 = safe.hex
collide4 = safe.hex
collide6 = safe.hex

if collide == safe.hex and collide2 == safe.hex and collide3 == safe.hex and collide4 == safe.hex:
image(car, player_x, player_y, 100, 31)
score += level
else:
text('💥', player_x, player_y)
level = 0


def setup():
# Setup your animation here
size(400, 400)
global car
car = load_image('car.png')
image_mode(CENTER)


def draw():
# Things to do in every frame
global score, safe, level
safe = Color(128)

if level > 0:
background(safe)
fill(255)
text_size(16)
text_align(RIGHT, TOP)
text('Score', width * 0.45, 10, width * 0.5, 20)
text(str(score), width * 0.45, 25, width * 0.5, 20)
text_size(20)
text_align(CENTER, TOP) # position around the centre, top
draw_obstacles()
draw_player()

run()
5 changes: 5 additions & 0 deletions ar-SA/code/dont_collide_clean_car_example/project_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: "Don't Collide: Clean Car"
identifier: "clean-car-example"
type: "python"


127 changes: 127 additions & 0 deletions ar-SA/code/dont_collide_dodge_asteroids_example/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#!/bin/python3

# Import library code
from p5 import *
from random import randint, seed

level = 1
score = 0
lives = 3
invun = 0

# The draw_obstacle function goes here
def draw_obstacles():
global level

seed(random_seed)

if frame_count % height == height - 1 and level < 8:
level += 1
print('You reached level', level)

for i in range(6 + level):
ob_x = randint(0, width)
ob_y = randint(0, height) + (frame_count * level)
ob_y %= height # wrap around
push_matrix()
translate(ob_x, ob_y)
rotate(degrees(randint(1, 359)+frame_count / 1000))
image(rock, 0, 0, randint(18,24), randint(18,24))
pop_matrix()


# The draw_player function goes here
def draw_player():
global score, level, lives, invun

player_y = int(height * 0.8)
player_x = mouse_x

collide = get(player_x, player_y).hex
collide2 = get(player_x - 18, player_y + 17).hex
collide3 = get(player_x + 18, player_y + 17).hex
collide4 = get(player_x, player_y + 25).hex

if player_x < width: # off the left of the screen
collide2 = safe.hex

if player_x > width: # off the right of the screen
collide3 = safe.hex

if (collide == safe.hex and collide2 == safe.hex and collide3 == safe.hex and collide4 == safe.hex) or invun > 0:
if lives == 0 and frame_count % 12 == 0:
tint(200, 0, 0)

image(rocket, player_x, player_y + 25, 64, 64)
score += level
invun -= 1
no_tint()

if invun > 0:
stroke(220)
fill(220, 220, 220, 60)
ellipse(player_x, player_y + 18, 47, 47)

elif lives > 1:
lives -= 1
invun = 50
tint(200, 0, 0)
image(rocket, player_x, player_y + 25, 64, 64)
no_tint()
score += level
else:
text('💥', player_x + 10, player_y + 5)
level = 0


def display_score():
global level

fill(255)
text_size(16)
text_align(RIGHT, TOP)
text('Score', width * 0.45, 10, width * 0.5, 20)
text(str(score), width * 0.45, 25, width * 0.5, 20)

if score > 10000:
level = 0
print('🎉🎉 You win! 🎉🎉')


def display_lives():
fill(255)
text_size(16)
text_align(LEFT, TOP)
text('Lives', width * 0.05, 10, 30, 20)

for i in range(lives):
image(rocket, width * 0.05 + i * 25, 40, 20, 20)


def setup():
# Setup your animation here
size(400, 400)
global rocket, rock, random_seed

text_size(40)
text_align(CENTER, TOP) # position around the centre, top

rocket = load_image('rocket.png')
rock = load_image('moon.png')
random_seed = randint(0, 1000000)

def draw():
# Things to do in every frame
global score, safe, level
safe = Color(0)

if level > 0:
background(safe)
fill(255)
image_mode(CENTER)
draw_obstacles()
draw_player()
display_score()
display_lives()

run()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: "Don't Collide: Dodge Asteroids"
identifier: "dodge-asteroids-example"
type: "python"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading