Skip to content
Snippets Groups Projects
Commit 35498923 authored by Arch de Noé's avatar Arch de Noé
Browse files

fix: use existing SP abreviation for block

parent 02623b20
1 merge request!2Feat block destruction
......@@ -12,7 +12,7 @@
}
int layers = -1;
std::vector<BlockSP> blocks;
std::vector<Block::SP> blocks;
std::string line, token;
// Get the number of layers
......@@ -171,7 +171,7 @@ void Grid::place(Vector2D game_window_size)
Vector2D last_position{game_window_size / 2.0f};
Vector2D first_of_layer{last_position};
auto common = [&](BlockSP & block){
auto common = [&](Block::SP & block){
block->set_rotation_radians(std::numbers::pi*0.5f);
block->set_scale(scale);
};
......
......@@ -10,10 +10,9 @@
class Grid
{
private:
using BlockSP = std::shared_ptr<Block>;
const int layers_;
const std::vector<BlockSP> blocks_;
Grid(int layers, std::vector<BlockSP> blocks) : layers_(layers), blocks_(std::move(blocks)){}
const std::vector<Block::SP> blocks_;
Grid(int layers, std::vector<Block::SP> blocks) : layers_(layers), blocks_(std::move(blocks)){}
public:
Grid() = delete;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment