mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-30 03:34:45 +00:00
19 lines
358 B
C++
19 lines
358 B
C++
|
#include "factorynetobjects.h"
|
||
|
#include "clientprotocol.h"
|
||
|
|
||
|
QVariantMap ClientProtocol::FactoryNetObjects::build(
|
||
|
ClientProtocol::NetworkClasses::Type type) {
|
||
|
|
||
|
auto obj = ClientProtocol::networkObjects.value(type);
|
||
|
QVariantMap res;
|
||
|
|
||
|
res ["command"] = type;
|
||
|
|
||
|
for (auto &&i: obj.keys()) {
|
||
|
res[i] = "";
|
||
|
}
|
||
|
|
||
|
return res;
|
||
|
}
|
||
|
|