Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- #include <string>
- #include <stdio.h>
- #include <iostream>
- #include <time.h>
- int px, py; //Координаты игрока
- using namespace std;
- class Block {
- //Единица блоков.
- public:
- int name;
- Block(int NameOfBlock = 0) {
- name = NameOfBlock;
- }
- };
- class Chunk {
- //Единица чанков. Содержит в себе блоки
- public:
- std::vector<std::vector<Block>> Blocks;
- Chunk() {//Создаем в чанке 32 ряда
- for (int i = 0; i != 32; i++) {
- Blocks.push_back(vector<Block>(32));
- }
- /*for (int i = 0; i != 32; i++) { Blocks.at(i).emplace_back(); }*/ //Создаем в каждом ряду по 32 блока
- /*Blocks.at(0).emplace_back("");*/
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement