Struktur konfigurasi objek lokal katalog permainan untuk simulasi pemuatan aplikasi.
{ } catalog-config.js{ } catalog-config.json
Salin kode
JavaScript
// Konfigurasi objek lokal untuk pengujian katalog permainan poker888
const localGameCatalog = {
platform: 'android' ,
brandName: 'poker888' ,
defaultGameId: '082' ,
availableGames: [
{ id: '082' , title: 'Gdn Ice Fire' , category: 'Permainan Slot' },
{ id: '042' , title: 'Journey To The Wealth' , category: 'Permainan Slot' },
{ id: '047' , title: 'Ninja Vs Samurai' , category: 'Permainan Slot' },
{ id: '174' , title: 'Dead Man Riches' , category: 'Permainan Slot' },
{ id: '103' , title: 'Spirit Wonder' , category: 'Permainan Slot' }
],
validateGame: function (gameId) {
return this.availableGames.some(item => item.id === gameId);
}
};
// Contoh pemeriksaan lokal
const isGameReady = localGameCatalog.validateGame('082' );JSON
{
"platform" : "android" ,
"brandName" : "poker888" ,
"defaultGameId" : "082" ,
"availableGames" : [
{
"id" : "082" ,
"title" : "Gdn Ice Fire" ,
"category" : "Permainan Slot"
},
{
"id" : "042" ,
"title" : "Journey To The Wealth" ,
"category" : "Permainan Slot"
},
{
"id" : "047" ,
"title" : "Ninja Vs Samurai" ,
"category" : "Permainan Slot"
},
{
"id" : "174" ,
"title" : "Dead Man Riches" ,
"category" : "Permainan Slot"
},
{
"id" : "103" ,
"title" : "Spirit Wonder" ,
"category" : "Permainan Slot"
}
]
}