|
|
@@ -5,7 +5,7 @@ int main() {
|
|
|
|
Chunk* testchunk = new Chunk();
|
|
|
|
Chunk* testchunk = new Chunk();
|
|
|
|
std::vector<BlockInfo*> testblock;
|
|
|
|
std::vector<BlockInfo*> testblock;
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << "-Test 1-------BlockInfo----------" << std::endl;
|
|
|
|
std::cout << "-Test 1-------BlockInfo------------------" << std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
testblock.push_back(new BlockInfo(BTYPE_AIR, "The air in the sky"));
|
|
|
|
testblock.push_back(new BlockInfo(BTYPE_AIR, "The air in the sky"));
|
|
|
|
testblock.push_back(new BlockInfo(BTYPE_DIRT, "The dirt on the ground"));
|
|
|
|
testblock.push_back(new BlockInfo(BTYPE_DIRT, "The dirt on the ground"));
|
|
|
@@ -32,9 +32,11 @@ int main() {
|
|
|
|
testblock[index]->Show();
|
|
|
|
testblock[index]->Show();
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << std::endl;
|
|
|
|
std::cout << std::endl;
|
|
|
|
std::cout << "-Test 3--------Chunk Copy---------------" << std::endl;
|
|
|
|
std::cout << "-Test 3--------Chunk Copy------------------" << std::endl;
|
|
|
|
Chunk testchunkcopy(*testchunk);
|
|
|
|
Chunk testchunkcopy(*testchunk);
|
|
|
|
|
|
|
|
|
|
|
|
delete testchunk;
|
|
|
|
delete testchunk;
|
|
|
|
|
|
|
|
|
|
|
|
testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(0, 0, 0), "A block in a copied chunk"));
|
|
|
|
testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(0, 0, 0), "A block in a copied chunk"));
|
|
|
|
testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(1, 0, 0), "A dirty block in a copied chunk"));
|
|
|
|
testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(1, 0, 0), "A dirty block in a copied chunk"));
|
|
|
|
testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(1, 0, 0), "A grassy block in a copied chunk"));
|
|
|
|
testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(1, 0, 0), "A grassy block in a copied chunk"));
|
|
|
@@ -43,11 +45,11 @@ int main() {
|
|
|
|
testblock[index]->Show();
|
|
|
|
testblock[index]->Show();
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << std::endl;
|
|
|
|
std::cout << std::endl;
|
|
|
|
std::cout << "-Test 3--------Chunk Reset/Remove Block-----------" << std::endl;
|
|
|
|
std::cout << "-Test 3--------Chunk Reset/Remove Block-----" << std::endl;
|
|
|
|
testchunkcopy.Reset(BTYPE_GRASS);
|
|
|
|
testchunkcopy.Reset(BTYPE_GRASS);
|
|
|
|
testchunkcopy.RemoveBlock(3, 0, 0);
|
|
|
|
testchunkcopy.RemoveBlock(3, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
testblock.empty();
|
|
|
|
testblock.clear();
|
|
|
|
|
|
|
|
|
|
|
|
for (int index = 0; index < 10; ++index)
|
|
|
|
for (int index = 0; index < 10; ++index)
|
|
|
|
testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(index, 0, 0), "A block in a reset chunk containing lots of grass"));
|
|
|
|
testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(index, 0, 0), "A block in a reset chunk containing lots of grass"));
|
|
|
|