You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to implement the core logic for a Pokémon guessing game using Vue 3. This will involve creating a composable that handles the game state, fetches Pokémon data from an external API, and provides functionality for gameplay. The game should present the user with a set of Pokémon to choose from, randomly select one as the correct answer, and allow the user to guess which one it is.
Key Features:
Game Status Handling: Track and update the status of the game, including states like "Playing," "Won," and "Lost."
Fetching Pokémon Data: Use an external API to fetch the first 151 Pokémon, extract relevant details (name and ID), and shuffle the list.
Random Pokémon Selection: Randomly select one Pokémon from a subset of options for the user to guess.
Game Rounds: Each round should present a limited number of Pokémon (e.g., 4) for the player to choose from.
Check Answer: Implement logic to check if the player's guess is correct or not, and update the game status accordingly.
Winning Feedback: If the player guesses correctly, display confetti as a visual reward.
Loading State: Implement a loading state that indicates when Pokémon data is being fetched.
Composable Structure: Return reactive properties and methods that can be easily used in Vue components.
The text was updated successfully, but these errors were encountered:
Description:
We need to implement the core logic for a Pokémon guessing game using Vue 3. This will involve creating a composable that handles the game state, fetches Pokémon data from an external API, and provides functionality for gameplay. The game should present the user with a set of Pokémon to choose from, randomly select one as the correct answer, and allow the user to guess which one it is.
Key Features:
The text was updated successfully, but these errors were encountered: