Grafical Games hub + home button :p

This commit is contained in:
2024-08-20 22:15:06 +02:00
parent ff2f9ddc29
commit a8e196f8ec
4 changed files with 86 additions and 5 deletions

24
Games/main.js Normal file
View File

@@ -0,0 +1,24 @@
const games = [
{
name: '2048',
link: '2048',
},{
name: 'Dice War',
link: 'DiceWar',
},{
name: 'Number Quess 6',
link: 'NumberQuess6',
},{
name: 'Rock Paper Scissors',
link: 'RockPaperScissors',
},
];
window.onload = () => {
for(let i=0; i<games.length; i++){
document.body.innerHTML += `
<a href="./${games[i].link}" class="game">
<img src="./img/${games[i].link}.png" alt="${games[i].name}">
</a>`
}
}