Implement main logic

This commit is contained in:
Martin Prokoph
2025-01-15 11:56:05 +01:00
parent ffdd3ca20f
commit 2959d06db4
13 changed files with 531 additions and 0 deletions

38
src/block.hpp Normal file
View File

@@ -0,0 +1,38 @@
#pragma once
#include "identifier.hpp"
#include "blockSettings.hpp"
class Block {
private:
Identifier id = Identifier("adventure", "missing");
char encoding;
BlockSettings settings;
public:
Block(Identifier id, char encoding, BlockSettings settings) {
this->id = id;
this->encoding = encoding;
this->settings = settings;
};
BlockSettings getSettings() {
return settings;
}
Identifier getId() {
return id;
}
char getEncoding() {
return encoding;
}
void setEncoding(char encoding) {
this->encoding = encoding;
}
std::ostream& operator<<(std::ostream& out) {
out << encoding;
return out;
}
bool operator==(Block otherBlock) {
return this->getId() == otherBlock.getId();
}
};