Struktur konfigurasi objek lokal dan skrip JavaScript untuk pemetaan metadata game.
JavaScript
// Konfigurasi objek lokal katalog game 99k
const localGameCatalog = {
brand: "99k",
environment: "local-test",
games: [
{ id: "113", name: "Btrfly Blossom", category: "Permainan Slot" },
{ id: "091", name: "Candy Superwin", category: "Permainan Slot" },
{ id: "006", name: "Medusa2", category: "Permainan Slot" },
{ id: "188", name: "Fortune Horse", category: "Permainan Slot" },
{ id: "174", name: "Dead Man Riches", category: "Permainan Slot" }
],
lookupGame: function(gameId) {
return this.games.find(g => g.id === gameId) || null;
}
};
// Contoh pengujian fungsi lokal
const selected = localGameCatalog.lookupGame("113");
console.log("Katalog Terpilih:", selected ? selected.name : "Tidak Ditemukan");
JSON
{
"brand": "99k",
"environment": "local-test",
"games": [
{
"id": "113",
"name": "Btrfly Blossom",
"category": "Permainan Slot"
},
{
"id": "091",
"name": "Candy Superwin",
"category": "Permainan Slot"
},
{
"id": "006",
"name": "Medusa2",
"category": "Permainan Slot"
},
{
"id": "188",
"name": "Fortune Horse",
"category": "Permainan Slot"
},
{
"id": "174",
"name": "Dead Man Riches",
"category": "Permainan Slot"
}
]
}