Today ProCodeCG Kids Programming Class learn how to create buildings inside Minecraft using codes.
Instead of clicking to create, or typing the commands one by one on the command prompt, they are forced to type the whole code 😀
And yep, they really do it!
This is the source code to create a triangle wall, which they will later use to create something interesting like pyramid 🙂
They do experiments like creating a box on the ground (which needs the up() command)
Then they create triangles in small sizes to the bigger ones…
… and so big it goes beyond the system can handle LOL
Kids need to do experiments, and often beyond the boundaries, to learn. Just give them the tools, the hints, and some examples, they will work things out 😉
Here, I typed the code shown on the 4th photography so you can replace the image for the code. This will make easier to copy for the readers:
var Drone = require(‘../drone’).Drone;
var blocks = require(‘blocks’);
function mytriangle(base,height)
{
this.chkpt(‘mytriangle’);
up(1);
if (typeof base == “undefined”)
base = 5;
if (typeof height == “undefined”)
height = base;
var j = base;
for (var i = 0; i < height; i++){
this.box(blocks.oak,j-i,1,1).up(1).right(1);
j–;
}
this.move('mytriangle');
};
Drone.extend(mytriangle);
LikeLike
i cannot see the parameters 😦
LikeLike
Just type the “
” tag at the end. It’s not needed to fill any parameter.
LikeLiked by 1 person
just double quotes?
LikeLike
Just type the “code” tags at the beginning (code) and at the end (/code), with “[” in the place of the “(“. It’s not needed to fill any parameters.
LikeLiked by 1 person
ah ok! thanks!!! 🙂
LikeLike
No, not just double quotes… It appears double quotes because the (code) and (/code) tags (with “[” in the place of “(“) worked in the comment, so they doesn’t appears. You can delete the comment with the error if you want.
LikeLike
woah cool! thx a lot mate!
LikeLike