Struktur data konfigurasi lokal untuk pemetaan katalog dan opsi antarmuka game.
{ } gameConfig.js{ } gameConfig.json
Salin kode
JavaScript
// Konfigurasi objek lingkungan game gb777 lokal
const gb777GameConfig = {
platformId: "gb777-id" ,
environment: "production" ,
defaultLocale: "id-ID" ,
catalog: [
{ id: "003" , title: "Fortune Gods" , category: "Permainan Slot" },
{ id: "119" , title: "Speed Winner" , category: "Permainan Slot" },
{ id: "026" , title: "Santas Gift Rush" , category: "Permainan Slot" },
{ id: "028" , title: "Gem Saviour Sword" , category: "Permainan Slot" },
{ id: "104" , title: "Lgd Monkey Kg" , category: "Permainan Slot" }
],
sessionTimeoutMs: 1800000 ,
features: {
enableSoundEffects: true ,
autoSavePreference: true
}
};
function getGameById(gameId) {
return gb777GameConfig.catalog.find(g => g.id === gameId) || null ;
} JSON
{
"platformId" : "gb777-id" ,
"environment" : "production" ,
"defaultLocale" : "id-ID" ,
"catalog" : [
{ "id" : "003" , "title" : "Fortune Gods" , "category" : "Permainan Slot" },
{ "id" : "119" , "title" : "Speed Winner" , "category" : "Permainan Slot" },
{ "id" : "026" , "title" : "Santas Gift Rush" , "category" : "Permainan Slot" },
{ "id" : "028" , "title" : "Gem Saviour Sword" , "category" : "Permainan Slot" },
{ "id" : "104" , "title" : "Lgd Monkey Kg" , "category" : "Permainan Slot" }
],
"sessionTimeoutMs" : 1800000 ,
"features" : {
"enableSoundEffects" : true ,
"autoSavePreference" : true
}
}