-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasketball.grph
More file actions
39 lines (38 loc) · 998 Bytes
/
basketball.grph
File metadata and controls
39 lines (38 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//back = (640,480 WHITE)// DEFAULT
shape r = Square(90,10 460,460 color[0 128 0])
shape c = Circle(200,120 240,240 radial[YELLOW 0.5,0.5 color[255 175 0] 0.5])
color littleBlack = color[0 0 0 0.75]
shape vertical = Line(320,120 320,360 littleBlack 4F cut)
shape horizontal = Line(200,240 440,240 littleBlack 4F cut)
validateAll:
boolean goRight = true
boolean jump = true
#while true
#if getXForPos[getPosition[r]] >= 180
goRight = false
#elseif getXForPos[getPosition[r]] <= 0
goRight = true
#if getYForPos[getPosition[c]] <= 120
jump = false
#elseif getYForPos[getPosition[c]] >= 150
jump = true
#if goRight
translate r: 1,0
translate c: 1,0
translate vertical: 1,0
translate horizontal: 1,0
#else
translate r: -1,0
translate c: -1,0
translate vertical: -1,0
translate horizontal: -1,0
#if jump
translate c: 0,-1
translate vertical: 0,-1
translate horizontal: 0,-1
#else
translate c: 0,2
translate vertical: 0,2
translate horizontal: 0,2
wait: 10
//