Snake/back-end/guiobjectfactory.cpp

16 lines
318 B
C++

#include "guiobjectfactory.h"
#include "box.h"
#include "utils.h"
#include "head.h"
GuiObjectFactory::GuiObjectFactory() {}
ItemWorld *GuiObjectFactory::generate(const QString &name) {
ItemWorld *obj = nullptr;
if (name == "Box") {
obj = new Box(-Global::deviceSize.x(), 0);
}
return obj;
}