Пример #1
0
GameDataCacheDBManager.prototype.createNew = function createNew(gameId, clientId, color, dots, trappedDots, loops) {
    var newGameData = CreationUtils.newGameData(
        this.getObjectId(gameId),
        this.getObjectId(clientId),
        dots,
        [],
        loops,
        color
    );
    return this.save(newGameData).then((id) => this.get(id));
};
Пример #2
0
GameDataDBManager.prototype.createNew = function createNew(gameId, clientId, color, dots, trappedDots, loops) {
    const newGameData = CreationUtils.newGameData(
        this.getObjectId(gameId),
        this.getObjectId(clientId),
        dots,
        [],
        loops,
        color
    );
    return this.save(newGameData);
};