diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-04-15 12:17:53 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-04-15 12:17:53 +0200 |
commit | 2ee0f834487cfe4b6bd9424ca2715685a8db16e4 (patch) | |
tree | 6867718d6bfcd42f6a82c86dd8f149d6ea6cab68 /Block.cpp | |
download | AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.gz AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.bz2 AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.lz AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.xz AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.zst AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.zip |
Diffstat (limited to 'Block.cpp')
-rw-r--r-- | Block.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Block.cpp b/Block.cpp new file mode 100644 index 0000000..7c45e76 --- /dev/null +++ b/Block.cpp @@ -0,0 +1,29 @@ +#include "Block.hpp" + + +Block::Block(int id, unsigned char state, unsigned char light, PositionI position) : m_id(id), m_position(position), + m_light(light), m_state(state) { + +} + +Block::~Block() { + +} + +int Block::GetId() { + return m_id; +} + +int Block::GetState() { + return m_state; +} + +int Block::GetLight() { + return m_light; +} + +Block::Block(unsigned short idAndState, unsigned char light) { + m_id = idAndState >> 4; + m_state = idAndState & 0b00001111; + m_light = light; +} |