diff --git a/Games/Madlibs/README.md b/Games/Madlibs/README.md new file mode 100644 index 0000000000..39ee6b0c79 --- /dev/null +++ b/Games/Madlibs/README.md @@ -0,0 +1,39 @@ +# **Madlibs** + +--- + +
+ +## **Description 📃** + +- Welcome to the Mad Libs Game, a fun and interactive word game that lets you create hilarious and unique stories by filling in the blanks! Simply enter a series of words—nouns, verbs, adjectives, and adverbs—and watch as your chosen words are placed into a pre-written story template. The result is a whimsical and often absurd tale that is sure to make you laugh. Perfect for parties, family gatherings, or just a bit of creative fun on your own, this game is a great way to enjoy some light-hearted entertainment. Get ready to unleash your imagination and see where the story takes you! + + + +## **Functionalities 🎮** + +- Multiple input fields for various parts of speech (nouns, verbs, adjectives, adverbs) to fill in the blanks for the story. +- A simple and intuitive form interface for entering words. +- Generates a unique story based on the user's input words. +- A button to submit the form and generate the story dynamically. +- A section to display the generated story, which only appears after the story is created. +- Easily customizable story template to create different versions or extend the game with additional input fields. + +
+ +## **How to play? 🕹️** + +1. Fill in each input field with the requested type of word (noun, verb, adjective, adverb, etc.). Be creative and have fun with your choices! +2. Once you have filled in all the fields, click the "Generate Mad Lib" button. +3. After clicking the button, your custom Mad Libs story will appear below the form. Enjoy reading the hilarious and unique story that you created! +4. Want to create another story? Simply change the words in the input fields and click the "Generate Mad Lib" button again to see a new story. + + +
+ +## **Screenshots 📸** + +![image](https://github.com/AaryanManghnani/GameZone/blob/New-Game-Madlibs/assets/images/Madlibs.png) + + +
diff --git a/Games/Madlibs/index.html b/Games/Madlibs/index.html new file mode 100644 index 0000000000..39df14ba41 --- /dev/null +++ b/Games/Madlibs/index.html @@ -0,0 +1,47 @@ + + + + + + Mad Libs Game + + + +
+

Mad Libs Game

+
+ +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +
+ + +
+ + + diff --git a/Games/Madlibs/script.js b/Games/Madlibs/script.js new file mode 100644 index 0000000000..50e28845c5 --- /dev/null +++ b/Games/Madlibs/script.js @@ -0,0 +1,22 @@ +function generateMadLib() { + // Get the values from the form + const noun1 = document.getElementById('noun1').value; + const verb1 = document.getElementById('verb1').value; + const adjective1 = document.getElementById('adjective1').value; + const adverb1 = document.getElementById('adverb1').value; + const noun2 = document.getElementById('noun2').value; + const verb2 = document.getElementById('verb2').value; + const adjective2 = document.getElementById('adjective2').value; + const adverb2 = document.getElementById('adverb2').value; + + // Create the story + const story = `Once upon a time, there was a ${adjective1} ${noun1} that loved to ${verb1} ${adverb1}. + Every morning, it would wake up and ${verb2} with its ${adjective2} ${noun2}. + One day, they decided to go on an adventure together. They ${verb1} through the forest and ${verb2} over the mountains, + always ${adverb1} and ${adverb2}. + By the end of the day, they were tired but happy, knowing they had experienced something truly ${adjective1}.`; + + // Display the story + document.getElementById('madLibStory').textContent = story; + document.getElementById('story').classList.remove('hidden'); +} diff --git a/Games/Madlibs/style.css b/Games/Madlibs/style.css new file mode 100644 index 0000000000..e5354fde7f --- /dev/null +++ b/Games/Madlibs/style.css @@ -0,0 +1,63 @@ +body { + font-family: Arial, sans-serif; + background-color: #f4f4f4; + margin: 0; + padding: 20px; + display: flex; + justify-content: center; + align-items: flex-start; + min-height: 100vh; + box-sizing: border-box; +} + +.container { + background-color: white; + padding: 20px; + border-radius: 10px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + text-align: center; + max-width: 400px; + width: 100%; +} + +.hidden { + display: none; +} + +h1 { + margin-bottom: 20px; +} + +form { + margin-bottom: 20px; +} + +label { + display: block; + margin-bottom: 5px; +} + +input { + width: calc(100% - 20px); + padding: 10px; + margin-bottom: 15px; + border: 1px solid #ccc; + border-radius: 5px; +} + +button { + padding: 10px 20px; + border: none; + background-color: #28a745; + color: white; + border-radius: 5px; + cursor: pointer; +} + +button:hover { + background-color: #218838; +} + +#story { + margin-top: 20px; +} \ No newline at end of file diff --git a/README.md b/README.md index 9644bfbcec..68f5fec0fa 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ This repository also provides one such platforms where contributers come over an | Game | Game | Game | Game | Game | -| [Master Typing](https://github.com/kunjgit/GameZone/tree/main/Games/Master_Typing) | [Treasure Hunt](https://github.com/Antiquely3059/GameZone/tree/main/Games/Treasure%20Hunt) | [Virtual Pet](https://github.com/Antiquely3059/GameZone/tree/main/Games/Virtual_Pet) | [MazeRunner](https://github.com/kunjgit/GameZone/tree/main/Games/MazeRunner) | [Ping_Pong_Singleplayer](https://github.com/kunjgit/GameZone/tree/main/Games/Ping_Pong_Singleplayer) | | +| [Master Typing](https://github.com/kunjgit/GameZone/tree/main/Games/Master_Typing) | [Treasure Hunt](https://github.com/Antiquely3059/GameZone/tree/main/Games/Treasure%20Hunt) | [Virtual Pet](https://github.com/Antiquely3059/GameZone/tree/main/Games/Virtual_Pet) | [MazeRunner](https://github.com/kunjgit/GameZone/tree/main/Games/MazeRunner) | [Ping_Pong_Singleplayer](https://github.com/kunjgit/GameZone/tree/main/Games/Ping_Pong_Singleplayer) | [Madlibs](https://github.com/AaryanManghnani/GameZone/tree/main/Games/Madlibs) | | [Tilting Maze](https://github.com/kunjgit/GameZone/tree/main/Games/Tilting_Maze) | [Simon Game Challenge](https://github.com/kunjgit/GameZone/tree/main/Games/Simon_Game_Challenge) | [Snake Game](https://github.com/kunjgit/GameZone/tree/main/Games/Snake_Game) | [Dino Runner Game](https://github.com/kunjgit/GameZone/tree/main/Games/Dino_Runner_Game) | | [Whack a Mole](https://github.com/kunjgit/GameZone/tree/main/Games/Whack_a_Mole) | [Doraemon Jump](https://github.com/kunjgit/GameZone/tree/main/Games/Doraemon_Jump) | [Black Jack](https://github.com/kunjgit/GameZone/tree/main/Games/Black_Jack) | [Memory Game](https://github.com/kunjgit/GameZone/tree/main/Games/Memory_Game) | [Word Guessing Game](https://github.com/kunjgit/GameZone/tree/main/Games/Word_Guessing_Game) @@ -129,7 +129,7 @@ This repository also provides one such platforms where contributers come over an | [Platform Game](https://github.com/kunjgit/GameZone/tree/main/Games/Platform_Game) | [Red Light Green Light](https://github.com/kunjgit/GameZone/tree/main/Games/Red_Light_Green_Light) | [Squash your Enemy](https://github.com/kunjgit/GameZone/tree/main/Games/Squashing_your_Enemy) | [Avax Gods](https://github.com/kunjgit/GameZone/tree/main/Games/Avax_gods) | [Flip Card Game](https://github.com/kunjgit/GameZone/tree/main/Games/Flip_Card_Game) | | [Bingo Game](https://github.com/kunjgit/GameZone/tree/main/Games/Bingo_Game) | [Fifteen Puzzle Game](https://github.com/kunjgit/GameZone/tree/main/Games/Fifteen_Puzzle_Game) | [Stack_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Stack_Game) | [Block.io_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Block.io) | [Country_Guesser_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Country_Guesser_Game) | | [Touch_The_Ball_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Touch_The_Ball) | [Sudoku](https://github.com/kunjgit/GameZone/tree/main/Games/Sudoku) | [Mini Golf](https://github.com/kunjgit/GameZone/tree/main/Games/Mini_Golf) | [Rubik's solver](https://github.com/kunjgit/GameZone/tree/main/Games/Rubik's_solver) | [Shoot_The_Balloon](https://github.com/kunjgit/GameZone/tree/main/Games/Shoot_The_Balloon) | -| [Dont_Die_To_Ghosts](https://github.com/kunjgit/GameZone/tree/main/Games/Dont_Die_To_Ghosts) | [SciFi Alchemy](https://github.com/kunjgit/GameZone/tree/main/Games/SciFi_Alchemy) | [Packabunchas](https://github.com/kunjgit/GameZone/tree/main/Games/Packabunchas) | [Cast and Catch](https://github.com/Sheetal-05/GameZone/tree/main/Games/Cast_and_Catch) | [Track Not Found](https://github.com/kunjgit/GameZone/tree/main/Games/Track_Not_Found) | +| [Dont_Die_To_Ghosts](https://github.com/kunjgit/GameZone/tree/main/Games/Dont_Die_To_Ghosts) | [SciFi Alchemy](https://github.com/kunjgit/GameZone/tree/main/Games/SciFi_Alchemy) | [Packabunchas](https://github.com/kunjgit/GameZone/tree/main/Games/Packabunchas) | [Cast and Catch](https://github.com/Sheetal-05/GameZone/tree/main/Games/Cast_and_Catch) | [Track Not Found](https://github.com/kunjgit/GameZone/tree/main/Games/Track_Not_Found) | | [Love Calculator Game](https://github.com/kunjgit/GameZone/tree/main/Games/Love_Calci) | [Planet Game](https://github.com/kunjgit/GameZone/tree/main/Games/Planet_Game) | [Snake Ladder](https://github.com/kunjgit/GameZone/tree/main/Games/Snake_Ladder) | [Among Us Game](https://github.com/kunjgit/GameZone/tree/main/Games/Among_Us_Game) | [Pokedex Game](https://github.com/kunjgit/GameZone/tree/main/Games/Pokedex) | | [Pacific Air Battle](https://github.com/kunjgit/GameZone/tree/main/Games/Pacific_Air_Battle) | [Dante](https://github.com/kunjgit/GameZone/tree/main/Games/Dante) | [Ping Pong Multiplayer](https://github.com/kunjgit/GameZone/tree/main/Games/Ping_Pong_Multiplayer) | [Sonic The Hedgehog](https://github.com/kunjgit/GameZone/tree/main/Games/Sonic_The_Hedgehog) | [World Of Emojis](https://github.com/kunjgit/GameZone/tree/main/Games/World_Of_Emojis) | | [Ball Fall Game](https://github.com/kunjgit/GameZone/tree/main/Games/Ball_Fall_Game) | [Pinball](https://github.com/kunjgit/GameZone/tree/main/Games/Pinball) | [Duck_Hunting_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Duck_Hunting_Game) | [Color Turner](https://github.com/kunjgit/GameZone/tree/main/Games/Color_Turner) | [Catch the Bunny](https://github.com/kunjgit/GameZone/tree/main/Games/Catch_the_Bunny) | @@ -929,4 +929,4 @@ Terms and conditions for use, reproduction and distribution are under the [Apach
-

Back to top

\ No newline at end of file +

Back to top

diff --git a/assets/images/Madlibs.png b/assets/images/Madlibs.png new file mode 100644 index 0000000000..2e5610a955 Binary files /dev/null and b/assets/images/Madlibs.png differ