Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dave Griffiths
creative-kids-coding-cornwall
Commits
272b8b9c
Commit
272b8b9c
authored
Apr 09, 2014
by
dave griffiths
Browse files
new experiments
parent
7b4e55a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
experiments/dungeon.py
experiments/dungeon.py
+24
-0
experiments/structure.py
experiments/structure.py
+24
-0
No files found.
experiments/dungeon.py
0 → 100644
View file @
272b8b9c
from
dbscode_minecraft
import
*
bulldoze
()
def
branch
(
chance
,
pos
,
d
,
depth
):
if
random_range
(
0
,
100
)
<
chance
:
tree
(
pos
,
point
(
depth
*
8
*
d
.
x
,
depth
*
8
*
d
.
y
,
depth
*
8
*
d
.
z
),
depth
-
1
)
def
tree
(
pos
,
d
,
depth
):
if
depth
>
0
:
box
(
AIR
,
pos
,
d
+
point
(
depth
*
3
,
depth
*
3
,
depth
*
3
))
branch
(
50
,
pos
+
d
,
point
(
1
,
0
,
0
),
depth
)
branch
(
50
,
pos
+
d
,
point
(
-
1
,
0
,
0
),
depth
)
branch
(
50
,
pos
+
d
,
point
(
0
,
0
,
1
),
depth
)
branch
(
50
,
pos
+
d
,
point
(
0
,
0
,
-
1
),
depth
)
branch
(
25
,
pos
+
d
,
point
(
0
,
-
1
,
0
),
depth
)
#i_am_lost()
#box(SANDSTONE,point(-100,0,-100),point(200,-200,200))
tree
(
point
(
0
,
0
,
0
),
point
(
0
,
5
,
0
),
5
)
experiments/structure.py
0 → 100644
View file @
272b8b9c
from
dbscode_minecraft
import
*
bulldoze
()
def
branch
(
chance
,
pos
,
d
,
depth
):
if
random_range
(
0
,
100
)
<
chance
:
tree
(
pos
,
point
(
depth
*
8
*
d
.
x
,
depth
*
8
*
d
.
y
,
depth
*
8
*
d
.
z
),
depth
-
1
)
def
tree
(
pos
,
d
,
depth
):
if
depth
>
0
:
box
(
AIR
,
pos
,
d
+
point
(
depth
*
3
,
depth
*
3
,
depth
*
3
))
branch
(
50
,
pos
+
d
,
point
(
1
,
0
,
0
),
depth
)
branch
(
50
,
pos
+
d
,
point
(
-
1
,
0
,
0
),
depth
)
branch
(
50
,
pos
+
d
,
point
(
0
,
0
,
1
),
depth
)
branch
(
50
,
pos
+
d
,
point
(
0
,
0
,
-
1
),
depth
)
branch
(
25
,
pos
+
d
,
point
(
0
,
-
1
,
0
),
depth
)
#i_am_lost()
#box(SANDSTONE,point(-100,0,-100),point(200,-200,200))
tree
(
point
(
0
,
0
,
0
),
point
(
0
,
5
,
0
),
5
)
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