Welcome to WarCardGameAI! This project revitalizes the classic "War" card game by integrating advanced artificial intelligence. Players can choose a theme, and the game dynamically generates cards with unique descriptions and images based on that theme. This project showcases skills in Python programming, API integration, GUI development, and version control.
- Features
- Screenshots
- Installation
- Usage
- Development
- Skills and Learning Outcomes
- Deployment
- License
- Contact
- AI-Generated Content: Dynamically creates card names, powers, and descriptions based on the selected theme using OpenAI's ChatGPT API.
- Custom Visuals: LeonardoAI API generates unique images for each card, ensuring alignment with the chosen theme.
- Intuitive GUI: A modern and user-friendly interface built with the CustomTkinter library.
- Error Handling: Comprehensive error handling ensures smooth gameplay.
- Theme Customization: Players can choose any theme he thinks of
- Python 3.7 or higher
- Internet connection for API access
- Clone the Repository:
git clone https://github.com/kwasniewskin/WarCardGameAI.git
- Navigate to the Project Directory:
cd WarCardGameAI
- Install Required Dependencies:
pip install -r requirements.txt
- Set Up API Keys:
- Create
ApiKeyOpenAi.txt
andApiKeyLeonardoAi.txt
in theWarCardGameAI/war_card_game
directory and paste your API keys.
- Create
- Launch the Game: Run the
main.py
script. - Select a Theme: Enter a theme and click "Generate Cards."
- Play the Game: Click "Next Round" to reveal the cards and determine the winner.
- Python: The core programming language used for the project.
- CustomTkinter: Used for building the GUI, providing a modern and responsive interface.
- OpenAI API: Generates text descriptions for the cards.
- LeonardoAI API: Creates custom card images based on the selected theme.
- PIL (Pillow): Handles image processing within the application.
- PyCharm: The Integrated Development Environment (IDE) used for coding, debugging, and testing.
- Git & GitHub: Version control tools that managed the development workflow, including feature branches, commits, and pull requests.
- API Integration: Gained experience in integrating and working with advanced AI-driven APIs, including handling their documentation and limitations.
- GUI Development: Developed a user-friendly and visually appealing desktop application using CustomTkinter, mastering layout management and user interaction handling.
- Error Handling: Implemented robust error handling strategies, ensuring a smooth user experience even when encountering unexpected issues.
- Version Control with Git: Learned and applied best practices for using Git, including merging, resolving conflicts, as well as maintaining a clean and informative commit history.
- Collaboration with GitHub: Managed the project using GitHub.
- The game is a desktop application and can be run on any machine with Python installed.
- Ensure that API keys are stored securely and are not exposed in public repositories.
This project is licensed under the MIT License - see the LICENSE.md file for details.
For any questions, support, or contributions:
- Nikodem Kwaśniewski
- Email: nikodem.kwasniewski.2@gmail.com
- GitHub: https://github.com/kwasniewskin