mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-29 19:24:42 +00:00
16 lines
307 B
C++
16 lines
307 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(rand() % 400, 0);
|
|
}
|
|
|
|
return obj;
|
|
}
|