diff --git a/SQCSim2021/blockinfo.h b/SQCSim2021/blockinfo.h index 44542e8..9ef279f 100644 --- a/SQCSim2021/blockinfo.h +++ b/SQCSim2021/blockinfo.h @@ -2,7 +2,6 @@ #define BLOCKINFO_H__ #include "define.h" -#include class BlockInfo { public: diff --git a/SQCSim2021/define.h b/SQCSim2021/define.h index baffa6e..d4413d5 100644 --- a/SQCSim2021/define.h +++ b/SQCSim2021/define.h @@ -2,6 +2,7 @@ #define DEFINE_H__ #include +#include #define CHUNK_SIZE_X 16 #define CHUNK_SIZE_Y 128 diff --git a/SQCSim2021/main.cpp b/SQCSim2021/main.cpp index ac7982a..73dd8ca 100644 --- a/SQCSim2021/main.cpp +++ b/SQCSim2021/main.cpp @@ -5,7 +5,7 @@ int main() { Chunk* testchunk = new Chunk(); std::vector 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_DIRT, "The dirt on the ground")); @@ -32,9 +32,11 @@ int main() { testblock[index]->Show(); std::cout << std::endl; - std::cout << "-Test 3--------Chunk Copy---------------" << std::endl; + std::cout << "-Test 3--------Chunk Copy------------------" << std::endl; Chunk testchunkcopy(*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(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")); @@ -43,11 +45,11 @@ int main() { testblock[index]->Show(); 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.RemoveBlock(3, 0, 0); - testblock.empty(); + testblock.clear(); 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")); diff --git a/SQCSim2021/main.h b/SQCSim2021/main.h index a326241..e124f29 100644 --- a/SQCSim2021/main.h +++ b/SQCSim2021/main.h @@ -2,7 +2,7 @@ #define MAIN_H__ #include -#include + #include "define.h" #include "chunk.h" #include "blockinfo.h"