blob: 7c45e76f9073439b6b2428731a206c80ebde4401 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
}
|