diff --git a/apps/claude helps 10 year old ChatGPT animal game/bird.png b/apps/claude helps 10 year old ChatGPT animal game/bird.png new file mode 100644 index 0000000..821f32d Binary files /dev/null and b/apps/claude helps 10 year old ChatGPT animal game/bird.png differ diff --git a/apps/claude helps 10 year old ChatGPT animal game/game.js b/apps/claude helps 10 year old ChatGPT animal game/game.js new file mode 100644 index 0000000..235d653 --- /dev/null +++ b/apps/claude helps 10 year old ChatGPT animal game/game.js @@ -0,0 +1,32 @@ +let points = 0; +let animalsUnlocked = ["rabbit"]; + +function playRabbitGame() { + // Code for the rabbit game will go here + // If the player wins, give them points + points += 10; + + // Check if they've earned enough points to unlock a new animal + if (points >= 20 && !animalsUnlocked.includes("bird")) { + animalsUnlocked.push("bird"); + alert("Congratulations! You've unlocked the bird adventure!"); + } +} +function updateAnimalButtons() { + let buttonHTML = ""; + for (let animal of animalsUnlocked) { + buttonHTML += ``; + } + document.getElementById("animalButtons").innerHTML = buttonHTML; +} +function showFact(animal) { + alert(animalFacts[animal]); + location.href = `${animal}.html`; +} +updateAnimalButtons(); + +let animalFacts = { + rabbit: "Rabbits are not rodents, they are lagomorphs!", + bird: "Some birds, like parrots, can learn to mimic human speech!", + lion: "Lions are the only cats that live in groups, called prides!" +}; \ No newline at end of file diff --git a/apps/claude helps 10 year old ChatGPT animal game/index.html b/apps/claude helps 10 year old ChatGPT animal game/index.html new file mode 100644 index 0000000..7628e85 --- /dev/null +++ b/apps/claude helps 10 year old ChatGPT animal game/index.html @@ -0,0 +1,18 @@ + + + + Emily's Animal Adventure Game + + + +

Welcome to Animal Adventures!

+
+ +
+Rabbit +Bird +Lion + + + + \ No newline at end of file diff --git a/apps/claude helps 10 year old ChatGPT animal game/lion.png b/apps/claude helps 10 year old ChatGPT animal game/lion.png new file mode 100644 index 0000000..7608959 Binary files /dev/null and b/apps/claude helps 10 year old ChatGPT animal game/lion.png differ diff --git a/apps/claude helps 10 year old ChatGPT animal game/rabbit.html b/apps/claude helps 10 year old ChatGPT animal game/rabbit.html new file mode 100644 index 0000000..468d656 --- /dev/null +++ b/apps/claude helps 10 year old ChatGPT animal game/rabbit.html @@ -0,0 +1,18 @@ + + + + Rabbit - Emily's Animal Adventure Game + + + +

Rabbit Adventure

+

Rabbits are fluffy, jumping creatures that love to eat carrots!

+ +
+

+ + +
+ + + \ No newline at end of file diff --git a/apps/claude helps 10 year old ChatGPT animal game/rabbit.js b/apps/claude helps 10 year old ChatGPT animal game/rabbit.js new file mode 100644 index 0000000..519a575 --- /dev/null +++ b/apps/claude helps 10 year old ChatGPT animal game/rabbit.js @@ -0,0 +1,50 @@ +let gameState = 0; + +function startGame() { + gameState = 0; + showGameState(); +} + +function showGameState() { + let text = ""; + let option1 = ""; + let option2 = ""; + + if (gameState === 0) { + text = "You are a hungry rabbit. You see two paths ahead. One leads to a garden full of carrots, the other leads to a fox's den. Which path do you choose?"; + option1 = "Path to the garden"; + option2 = "Path to the fox's den"; + } else if (gameState === 1) { + text = "Great choice! You safely reach the garden and feast on delicious carrots. You win!"; + option1 = "Play again"; + option2 = "Go back to animal selection"; + } else if (gameState === 2) { + text = "Oh no! You ran into the fox and had to flee. Better luck next time!"; + option1 = "Try again"; + option2 = "Go back to animal selection"; + } + + document.getElementById("gameText").innerHTML = text; + document.getElementById("option1").innerHTML = option1; + document.getElementById("option2").innerHTML = option2; +} + +document.getElementById("option1").addEventListener("click", function() { + if (gameState === 0) { + gameState = 1; + } else { + startGame(); + } + showGameState(); +}); + +document.getElementById("option2").addEventListener("click", function() { + if (gameState === 0) { + gameState = 2; + } else { + location.href = "index.html"; + } + showGameState(); +}); + +startGame(); \ No newline at end of file diff --git a/apps/claude helps 10 year old ChatGPT animal game/rabbit.png b/apps/claude helps 10 year old ChatGPT animal game/rabbit.png new file mode 100644 index 0000000..90a591c Binary files /dev/null and b/apps/claude helps 10 year old ChatGPT animal game/rabbit.png differ diff --git a/apps/claude helps 10 year old ChatGPT animal game/style.css b/apps/claude helps 10 year old ChatGPT animal game/style.css new file mode 100644 index 0000000..d2b7918 --- /dev/null +++ b/apps/claude helps 10 year old ChatGPT animal game/style.css @@ -0,0 +1,37 @@ +body { + font-family: Arial, sans-serif; + text-align: center; + background-color: #d0f0c0; /* light green background */ +} + +h1 { + color: #2e8b57; + font-size: 48px; + text-shadow: 2px 2px white; +} + +button { + font-size: 24px; + padding: 10px 20px; + margin: 10px; + border: none; + border-radius: 10px; + background-color: #4CAF50; + color: white; + cursor: pointer; + box-shadow: 2px 2px 2px rgba(0,0,0,0.2); +} + +button:hover { + background-color: #3e8e41; +} + +#game { + background-color: #f0e68c; + padding: 20px; + border-radius: 10px; +} + +#gameText { + font-size: 24px; +} \ No newline at end of file