Skip to content

This is a simple Blackjack game written in Python with both GUI and command-line support. Enjoy the thrill of Blackjack with colorful emojis and a user-friendly graphical interface! ๐Ÿ˜Ž๐ŸŽด

License

Notifications You must be signed in to change notification settings

KernFerm/black-jack-mini-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

80 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Blackjack Logo

READ EVERYTHING CAREFULLY


Support the Project โญ

  • If you find this project useful, please give it a star! Your support is appreciated and helps keep the project growing. ๐ŸŒŸ

๐Ÿ“‚ .github/             - GitHub configuration folder
๐Ÿ“‚ main-blackjack-game  - Has the main.py ( non docker )
๐Ÿ“‚ Logo/                - Project logos
๐Ÿ“„ .gitignore           - Git ignored files
๐Ÿ“„ CODE_OF_CONDUCT.md   - Code of conduct for the project
๐Ÿ“„ LICENSE              - License for the project
๐Ÿ“„ README.md            - Project documentation
๐Ÿ“„ SECURITY.md          - Security policies
๐Ÿ“„ blackjack.py         - Blackjack game logic for Docker
๐Ÿ“„ docker-compose.yml   - Docker Compose configuration
๐Ÿ“„ dockerfile           - Dockerfile for building the image
๐Ÿ“„ install.bat          - Installation batch script
๐Ÿ“„ requirements.txt     - Python dependencies

๐ŸŽ‰ Welcome to Blackjack! ๐ŸŽ‰

This is a simple Blackjack game written in Python with both GUI and command-line support. Enjoy the thrill of Blackjack with colorful emojis and a user-friendly graphical interface! ๐Ÿ˜Ž๐ŸŽด

๐ŸŽฒ How to Play

  1. Hit ๐Ÿƒ - Draw another card and add it to your hand.
  2. Stand ๐Ÿšถ - Keep your current hand and see if you beat the dealer.
  3. Forfeit ๐Ÿšซ - Give up and let the dealer win automatically.

๐ŸŽจ Features

  • Command-line Version: Play directly in the terminal using your keyboard.
  • GUI Version: Play using buttons with a graphical interface (Tkinter-based).
  • ๐ŸŽจ Colored Text: Uses colorama to bring your game to life with colors!
  • ๐Ÿƒ Card Drawing: Random card selection simulating a real Blackjack game.
  • ๐Ÿ† Win Conditions: Play against the dealer and see if you can beat the house.

The goal is to get as close to 21 as possible without going over. If you go over 21, you bust ๐Ÿ’ฅ and lose the game!

Download the EXE of the Application Click Here

Join the Discord - Fnbubbles420 Org Community

  • Follow the Instruction to install Docker Desktop App if you need help

๐Ÿƒ Blackjack Game in Docker

This project is a command-line Blackjack game built using Python and Docker.

blackjack.py is for Docker

Download and install Docker

๐Ÿณ Docker Commands

๐Ÿ› ๏ธ Build the Docker image:

docker build -t blackjack-game .

โ–ถ๏ธ Run the Docker container interactively:

docker run -it blackjack-game

โ™ป๏ธ Rebuild the Docker image without cache:

docker build --no-cache -t blackjack-game .

๐Ÿ“‹ List running containers:

docker ps

๐Ÿ›‘ Stop a running container:

docker stop <container_id>

๐Ÿ“œ View logs from the container:

docker logs <container_id>

๐Ÿ—‘๏ธ Remove the container:

docker rm <container_id>

๐Ÿ—‘๏ธ Remove the Docker image:

docker rmi blackjack-game
  • These commands will help you manage the Blackjack game using Docker efficiently.

๐Ÿ–ฅ GUI Version

If you prefer a graphical interface, this version comes with a simple Tkinter-based GUI, providing buttons for "Hit," "Stand," and "Forfeit." The game state, including your cards and the dealer's cards, will be displayed in the window.

๐Ÿ Python Versions Supported

  • This game supports the following Python versions:
  1. Python 3.11.6 - Download here
  2. Python 3.11.9 - Download here
  3. Python 3.12.1 - Download here

๐Ÿ›  GUI Setup

  1. Ensure you have Python installed (3.11.6 or later recommended).

  2. Install the required dependencies by running:

    pip install colorama tk
    
  3. Run the game using:

  • make sure to CD
  • a. right click on main.py file in the main-blackjack folder
  • b. go to properties
  • c. find location
  • d. copy entire location
  • e. paste location you just copied paste it in CMD.exe
  • f. press enter
    python main.py
    

๐Ÿ›  Command-Line Version Setup

Option 1: Manual Setup

  1. Ensure you have Python installed (3.11.6 or later recommended).

  2. Install the required dependencies by running:

    pip install colorama tk
    
  3. Download or clone this repo.

  4. Run the game using:

  • make sure to CD
  • a. right click on main.py file in the main-blackjack folder
  • b. go to properties
  • c. find location
  • d. copy entire location
  • e. paste location you just copied paste it in CMD.exe
  • f. press enter
    python main.py
    

Option 2: Automated Setup Using Batch Script

  • If you prefer an automated setup, you can use the provided batch script:
  • A Batch script is included in the repo with all the necessary files.
  • No need to create a file manually.

Example Batch Script

@echo off
:: Batch script to install colorama and tkinter with a loading bar for finalization

echo Installing colorama...
pip install colorama

echo Press Enter to continue to install the other dependencies.
pause

echo Installing tkinter...
pip install tk

echo Press Enter to finalize the install.
pause

:: Finalization with a loading bar
echo Finalizing...
setlocal
set "progressBar="
for /L %%A in (1,1,10) do (
    set "progressBar=#%progressBar%"
    echo [%progressBar%] %%A0%%
    ping -n 2 127.0.0.1 >nul
)

endlocal
echo All packages have been installed!
echo You may now exit the cmd.exe.
pause
  • Double-click install.bat to run the script. It will automatically install the colorama package with a progress bar for better user experience.

  • After installation, run the game using:

    python main.py
    

๐Ÿ“œ License

  • This project is proprietary and all rights are reserved by the author. Unauthorized copying, distribution, or modification of this project is strictly prohibited. Unless You have written permission from the Developer or the FNBUBBLES420 ORG.

๐ŸŽฎ Enjoy the Game!

  • Have fun playing Blackjack, and may the cards be ever in your favor! ๐Ÿ€๐ŸŽด

Acknowledgement

About

This is a simple Blackjack game written in Python with both GUI and command-line support. Enjoy the thrill of Blackjack with colorful emojis and a user-friendly graphical interface! ๐Ÿ˜Ž๐ŸŽด

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks