From f00b40e9459689af33dd04a1ff64dd7ca5815619 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sat, 5 Mar 2022 11:42:41 -0800 Subject: [PATCH] Clean up unneeded curly braces in block type initialization --- src/Main.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Main.cpp b/src/Main.cpp index 29b03bd..a341410 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -43,14 +43,13 @@ class BlockType { } }; -// https://stackoverflow.com/questions/12844475 -BlockType BlockType::i(&TileType::white, {{{{0, 0, 0, 0}}, {{1, 1, 1, 1}}}}); -BlockType BlockType::j(&TileType::red, {{{{1, 0, 0, 0}}, {{1, 1, 1, 0}}}}); -BlockType BlockType::l(&TileType::green, {{{{0, 0, 0, 1}}, {{0, 1, 1, 1}}}}); -BlockType BlockType::o(&TileType::blue, {{{{0, 1, 1, 0}}, {{0, 1, 1, 0}}}}); -BlockType BlockType::s(&TileType::yellow, {{{{0, 1, 1, 0}}, {{1, 1, 0, 0}}}}); -BlockType BlockType::t(&TileType::magenta, {{{{0, 1, 0, 0}}, {{1, 1, 1, 0}}}}); -BlockType BlockType::z(&TileType::cyan, {{{{1, 1, 0, 0}}, {{0, 1, 1, 0}}}}); +BlockType BlockType::i(&TileType::white, {{0, 0, 0, 0}, {1, 1, 1, 1}}); +BlockType BlockType::j(&TileType::red, {{1, 0, 0, 0}, {1, 1, 1, 0}}); +BlockType BlockType::l(&TileType::green, {{0, 0, 0, 1}, {0, 1, 1, 1}}); +BlockType BlockType::o(&TileType::blue, {{0, 1, 1, 0}, {0, 1, 1, 0}}); +BlockType BlockType::s(&TileType::yellow, {{0, 1, 1, 0}, {1, 1, 0, 0}}); +BlockType BlockType::t(&TileType::magenta, {{0, 1, 0, 0}, {1, 1, 1, 0}}); +BlockType BlockType::z(&TileType::cyan, {{1, 1, 0, 0}, {0, 1, 1, 0}}); BlockType* BlockType::list[] = {&i, &j, &l, &o, &s, &t, &z}; class Block {