summaryrefslogblamecommitdiffstats
path: root/old/world/Block.cpp
blob: e88068a92c2f677c3c0f9fd8874cdee68839787c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                              
#include "Block.hpp"

Block::~Block() {}

Block::Block(unsigned short id, unsigned char state) : id(id), state(state) {}

Block::Block() : id(0), state(0) {}

bool operator<(const Block &lhs, const Block &rhs) {
	if (lhs.id < rhs.id)
		return true;
	if (lhs.id == rhs.id) {
		if (lhs.state != rhs.state)
			return lhs.state < rhs.state;
	}
	return false;
}