From b4f6cd5dc161f89f7ca14f2e5e0654f977971fdb Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Thu, 9 Aug 2018 07:05:19 +0500 Subject: Refactored Block --- src/Block.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/Block.cpp') diff --git a/src/Block.cpp b/src/Block.cpp index 41199de..56fa371 100644 --- a/src/Block.cpp +++ b/src/Block.cpp @@ -1,25 +1,5 @@ #include "Block.hpp" -#include - -Block::~Block() {} - -Block::Block(unsigned short id, unsigned char state, - unsigned char light, unsigned char sky) - : id(id), state(state), light(light), sky (sky) {} - -Block::Block() : id(0), state(0), light(0), sky(0) {} - -bool operator==(const BlockId& lhs, const BlockId &rhs) { - return (lhs.id == rhs.id) && (lhs.state == rhs.state); -} - -bool operator<(const BlockId& lhs, const BlockId &rhs) { - if (lhs.id < rhs.id) - return true; - return lhs.state < rhs.state; -} - std::pair TransformBlockIdToBlockStateName(BlockId blockId) { switch (blockId.id) { case 1: { -- cgit v1.2.3