Advertisement
SSS_Krut

vector<vector<class>>

Dec 27th, 2020 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #include <vector>
  2. #include <string>
  3. #include <stdio.h>
  4. #include <iostream>
  5. #include <time.h>
  6. using namespace std;
  7. class Block {
  8.     //Единица блока к.
  9. public:
  10.     int name;
  11.     Block(int NameOfBlock) {
  12.         name = NameOfBlock;
  13.     }
  14. };
  15.  
  16. class Chunk {
  17.     //Единица чанков. Содержит в себе блоки к.
  18. public:
  19.     std::vector<std::vector<Block*>> Blocks;
  20.     Chunk() {
  21.         Blocks.push_back(vector<Block*>(32));
  22.         for (int i = 0; i != Blocks.size(); i++) {
  23.             Blocks[i].push_back(Block);
  24.         }
  25.     }
  26.     void FThit(float seed) {
  27.         for (int xB = 0; xB != Blocks.size(); xB++) {
  28.             for (int yB = 0; yB != Blocks[xB].size(); yB++) {
  29.             }
  30.         }
  31.     }
  32.     ~Chunk() {
  33.         Blocks.clear();
  34.     }
  35. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement