Skip to content

Commit

Permalink
Angry Bird
Browse files Browse the repository at this point in the history
  • Loading branch information
arunimaChintu committed Jul 6, 2024
1 parent 671a572 commit 2e7bc04
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Games/Angry Bird/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Angry Birds GG Script</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Angry Birds GG Script</h1>
<button id="modify-coins">Modify Coins</button>
<button id="unlock-levels">Unlock All Levels</button>
<button id="unlock-birds">Unlock All Birds</button>
<button id="exit">Exit</button>
<script src="script.js"></script>
</body>
</html>
17 changes: 17 additions & 0 deletions Games/Angry Bird/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"manifest_version": 2,
"name": "Angry Birds GG Script",
"version": "1.0",
"description": "A script to modify coins, unlock levels, and unlock birds in Angry Birds for educational purposes.",
"icons": {
"48": "icon.png"
},
"browser_action": {
"default_popup": "index.html",
"default_icon": "icon.png"
},
"permissions": [
"activeTab"
]
}

49 changes: 49 additions & 0 deletions Games/Angry Bird/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Function to modify coins
function modifyCoins() {
let coins = prompt("Enter your current amount of coins:");
coins = parseInt(coins);
if (isNaN(coins)) {
alert("Invalid number. Please try again.");
return;
}
let newCoins = 999999;
alert(`Coins modified successfully to ${newCoins}!`);
}

// Function to unlock all levels
function unlockAllLevels() {
alert("All levels unlocked!");
}

// Function to unlock all birds
function unlockAllBirds() {
alert("All birds unlocked!");
}

// Function to handle button clicks
function handleButtonClick(event) {
const buttonId = event.target.id;
switch (buttonId) {
case "modify-coins":
modifyCoins();
break;
case "unlock-levels":
unlockAllLevels();
break;
case "unlock-birds":
unlockAllBirds();
break;
case "exit":
alert("Exiting script...");
break;
default:
break;
}
}

// Add event listeners to buttons
document.getElementById("modify-coins").addEventListener("click", handleButtonClick);
document.getElementById("unlock-levels").addEventListener("click", handleButtonClick);
document.getElementById("unlock-birds").addEventListener("click", handleButtonClick);
document.getElementById("exit").addEventListener("click", handleButtonClick);

21 changes: 21 additions & 0 deletions Games/Angry Bird/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
background-color: #f0f0f0;
}

button {
margin: 10px;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
}

h1 {
margin-bottom: 20px;
}

Binary file added assets/images/AngryBird.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2e7bc04

Please sign in to comment.