2016-03-01 13:51:42

Hello,
I have one problem in bgt. I programming a minecraft for blind and I need make a good movement system. I have thinked one, but I dont know how to make array of arrays of blocks. Block is class with some informations about block, and I need to create three dymensional array.
How to do this?
Thanks for answer.

2016-03-01 15:08:51

// Creating the array:
block@[][][] blocks;

// However, you will want to resize it something like so:
void resize(uint width, uint height, uint depth) {

blocks.resize(width);
for(uint x=0; x<width; x++) {
blocks[x].resize(height);
for(uint y=0; y<height; y++) {
blocks[x][y].resize(depth);
}
}
}
看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.