Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BLOCK.H
- #pragma once
- #include "pch.h"
- #include "EnumClassBlockType.h"
- class Block
- {
- public:
- Block(Point2f pos, BlockType blockType);
- private:
- Point2f m_Pos;
- BlockType m_BlockType;
- };
- BLOCK.CPP
- #include "pch.h"
- #include "Blocks.h"
- Block::Block(Point2f pos, float blockSize) : m_Pos(pos),
- m_BlockType(BlockType::noPlayArea)
- {}
- PlayArea.h
- #pragma once
- #include "pch.h"
- #include "Block.h"
- class PlayArea
- {public:
- void InitPlayArea();
- private:
- Block m_PlayArea[24][13];
- };
- PlayArea.cpp
- #include "pch.h"
- #include "PlayArea.h"
- void PlayArea::InitPlayArea()
- {
- for (int y{0}; y<13;y++)
- {
- for (int x{0};x<24;x++)
- {
- m_PlayArea[y][x] = Block{ Point2f{0,0},BlockType::noPlayArea };
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement