RAP BATTLE is a fun and interactive two-player game where players test their knowledge of musical collaborations. The game is powered by the Genius API, allowing players to explore artists and their featured collaborations in a competitive and engaging way.
-
Start the Game:
- Enter the names of Player 1 and Player 2.
- Player 1 starts by choosing an artist.
-
Take Turns:
- Players alternate turns, naming an artist that has collaborated with the previously mentioned artist.
- The game fetches collaboration data from the Genius API to validate the answers.
-
Make a Mistake:
- If a player names an artist that has not collaborated with the current artist or that has already been named, the round ends.
- The other player earns 1 point, and a new round begins.
-
Win the Game:
- The game continues until players decide to quit. The player with the highest score wins!
-
Dynamic Gameplay:
- Fetches real-time collaboration data using the Genius API.
- Automatically validates player inputs.
-
Score Tracking:
- Keeps track of scores for both players across multiple rounds.
-
Interactive UI:
- Built with PyQt5 for a smooth and user-friendly experience.
-
Customizable:
- Players can input their own Genius API token to access the Genius database.
-
Error Handling:
- Handles invalid artist names, API errors, and unexpected scenarios gracefully.
- Python 3.10 or higher
- Genius API token (required for fetching artist data)
PyQt5requestspython-dotenv
Install the required libraries using:
pip install -r requirements.txt-
Clone the repository:
git clone https://github.com/maniiaak/RapBattle.git cd rap-battle -
Install dependencies:
pip install -r requirements.txt
-
Add your Genius API token:
- When you run the game for the first time, you will be prompted to enter your Genius API token.
- The token will be saved in a .env file for future use.
-
Run the game:
python main.py
Contributions are welcome! Feel free to open issues or submit pull requests to improve the game.
This project is licensed under the MIT License. See the LICENSE file for details.