biquadris / boardDecorator.cc
boardDecorator.cc
Raw
#include "boardDecorator.h"
#include "model.h"
using namespace std;

BoardDecorator::BoardDecorator(std::shared_ptr<Board> component, BiquadrisModel *model): component{component} {
    attach(model);
}

BoardDecorator::~BoardDecorator() {}

std::shared_ptr<Board> BoardDecorator::nextComponent() { return component; }

void BoardDecorator::move(char direction, int n, int weight) { component->move(direction, n, weight); }

void BoardDecorator::drop() { component->drop(); }

void BoardDecorator::placeCurrBlock() { component->placeCurrBlock(); }

void BoardDecorator::replaceCurrBlock(char type, bool safety) { component->replaceCurrBlock(type); }

int BoardDecorator::getLevel() const noexcept { return component->getLevel(); }

int BoardDecorator::getWidth() const noexcept { return component->getWidth(); }

int BoardDecorator::getHeight() const noexcept { return component->getHeight(); }

int BoardDecorator::getBoardId() const noexcept { return component->getBoardId(); }

char BoardDecorator::getNextBlock() const noexcept { return component->getNextBlock(); }

int BoardDecorator::getLastNumLinesCleared() const noexcept { return component->getLastNumLinesCleared(); }

Block* BoardDecorator::getBlock(int row, int col) { return component->getBlock(row, col); }

string BoardDecorator::getHint() { return component->getHint(); }

void BoardDecorator::hint() { return component->hint(); }

std::shared_ptr<Board> BoardDecorator::getComponent() { return component; }

void BoardDecorator::drawBlock(int row, int col, Block *block) { component->drawBlock(row, col, block); }

void BoardDecorator::eraseBlock(int row, int col) { component->eraseBlock(row, col); }

void BoardDecorator::rotate(bool isClockwise, int n, int weight) { component->rotate(isClockwise, n, weight); }

void BoardDecorator::levelUp() { component->levelUp(); }

void BoardDecorator::levelDown() { component->levelDown(); }

void BoardDecorator::setSequence(std::string file) { component->setSequence(file); }

void BoardDecorator::setRandom(bool r) { component->setRandom(r); }

char BoardDecorator::getType(int row, int col) { return component->getType(row, col); }

void BoardDecorator::restart() { component->restart(); }