diff --git a/shop.css b/shop.css deleted file mode 100644 index e69de29..0000000 diff --git a/shop.html b/shop.html deleted file mode 100644 index fe14ca4..0000000 --- a/shop.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - Shop - - - -

Shop

-
-
-

-10 seconds cooldown

-

Price: $50,000

- -
-
-

Item 2

-

Price: $20

- -
-
-

Item 3

-

Price: $30

- -
- - \ No newline at end of file diff --git a/shop1.js b/shop1.js deleted file mode 100644 index f17ba31..0000000 --- a/shop1.js +++ /dev/null @@ -1,39 +0,0 @@ -// Define the shop -let shop = { - items: [ - { name: 'Item 1', cost: 50000 }, - { name: 'Item 2', cost: 20 }, - { name: 'Item 3', cost: 30 }, - ] -}; - -// Define the player -let player = { - coins: 50, - inventory: [], -}; - -// Function to buy an item -function buyItem(itemName) { - // Find the item in the shop - let item = shop.items.find(i => i.name === itemName); - - // If the item doesn't exist, return an error - if (!item) { - return 'Item not found in shop'; - } - - // If the player doesn't have enough coins, return an error - if (player.coins < item.cost) { - return 'Not enough coins'; - } - - // Subtract the cost from the player's coins - player.coins -= item.cost; - - // Add the item to the player's inventory - player.inventory.push(item); - - return `You bought ${itemName}!`; -} -