Skip to content

SajagIN/termijack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿƒ TermiJack Casino

TermiJack Logo

A stunning terminal-based blackjack game with rich colors, animations, and casino-quality experience

Python Rich Platform

๐ŸŽฎ Quick Start โ€ข ๐ŸŽฏ Features โ€ข ๐Ÿ“ธ Screenshots โ€ข ๐Ÿ“– Documentation


๐ŸŽฒ Welcome to the Terminal Casino!

TermiJack brings the excitement of Las Vegas blackjack right to your terminal! Experience the thrill of 21 with beautiful ASCII art cards, smooth animations, and an intuitive interface that makes you feel like you're sitting at a real casino table.


๐ŸŽฏ Features

๐Ÿƒ Game Features

  • โ™ ๏ธ Full Blackjack Rules - Hit, stand, blackjack detection
  • ๐ŸŽฐ Smart Dealer AI - Proper casino dealer behavior
  • ๐Ÿ’ณ Flexible Betting - Custom amounts with helpful shortcuts
  • ๐Ÿฆ Bankroll Management - Start with $1000, bankruptcy protection
  • ๐Ÿ”„ Endless Play - Play as many rounds as you want

๐ŸŽจ UI/UX Features

  • ๐ŸŒˆ Rich Colors - Suit-appropriate card coloring
  • โœจ Smooth Animations - Card dealing and drawing effects
  • ๐Ÿ“ฑ Responsive Layout - Adapts to different terminal sizes
  • ๐Ÿ†˜ Built-in Help - Contextual help system throughout
  • โšก Fast Performance - Instant response and smooth gameplay

๐Ÿš€ Quick Start

Download a Release (Recommended)

  • Get the right executable for your OS from the Releases page.
  • No Python or dependencies needed. Just run it!

Prerequisites

Python 3.8+

Installation

  1. Clone the Repository

    git clone https://github.com/SajagIN/termijack.git
    cd termijack
  2. Install Dependencies

    pip install rich
  3. Start Playing!

    python main.py

Alternative: One-Line Install

git clone https://github.com/SajagIN/termijack.git && cd termijack && pip install rich && python main.py

๐ŸŽฎ How to Play

๐Ÿƒ Game Controls

Betting Phase

  • Enter any amount between $1 and your current chips
  • Quick shortcuts:
    • min - Bet $1 (minimum)
    • max - Go all-in with everything
    • half - Bet half your chips
    • help - Show detailed betting help

Playing Phase

  • H or hit - Take another card
  • S or stand - Keep your current hand
  • help - Show game rules and strategy tips

Game Management

  • P or play - Start another round
  • Q or quit - Leave the casino
  • Ctrl+C - Emergency exit anytime
๐ŸŽฒ Blackjack Rules

Objective

Get as close to 21 as possible without going over, while beating the dealer's hand.

Card Values

  • Number cards (2-10): Face value
  • Face cards (J, Q, K): Worth 10 points each
  • Aces: Worth 11 or 1 (automatically optimized)

Winning Conditions

  • ๐ŸŽ‰ Blackjack - 21 with exactly 2 cards (pays 2.5x)
  • โœ… Regular Win - Beat dealer without busting (pays 2x)
  • ๐Ÿค Push - Tie with dealer (get your bet back)
  • โŒ Bust - Go over 21 (lose your bet)

Dealer Rules

  • Must hit on 16 or less
  • Must stand on 17 or more
  • No strategic decisions (house rules)

๐Ÿ“ธ Screenshots

๐ŸŽช Title Screen

๐ŸŽฐ Game Interface


๐Ÿ—๏ธ Architecture

TermiJack is built with a clean, modular architecture that separates concerns beautifully:

๐Ÿ“ฆ TermiJack/
โ”œโ”€โ”€ ๐Ÿš€ main.py                # Game entry point
โ”œโ”€โ”€ ๐Ÿ”ง ui.py                  # UI compatibility layer
โ”œโ”€โ”€ ๐Ÿƒ cards.py               # Card and deck logic
โ”œโ”€โ”€ ๐ŸŽฒ game.py                # Blackjack game engine
โ””โ”€โ”€ ๐Ÿ“ ui/                    # User interface package
    โ”œโ”€โ”€ ๐ŸŽญ main_ui.py         # Main UI controller
    โ”œโ”€โ”€ ๐ŸŽจ card_renderer.py   # ASCII card graphics
    โ”œโ”€โ”€ ๐Ÿ“ layout_manager.py  # Screen layout system
    โ”œโ”€โ”€ โŒจ๏ธ  input_handler.py  # Input processing
    โ”œโ”€โ”€ ๐Ÿ“Š info_panels.py     # Information displays
    โ”œโ”€โ”€ โœจ animations.py      # Visual effects
    โ””โ”€โ”€ ๐Ÿ“‹ __init__.py        # Package setup

๐ŸŽ“ For Developers

๐Ÿ”ง Tech Stack

  • Language: Python 3.8+
  • UI Framework: Rich (Advanced terminal formatting)

๐Ÿงช Testing

# Test basic functionality
python -c "from ui import UI; from game import Game; print('โœ… All systems operational!')"

# Test card rendering
python -c "from cards import Deck; d = Deck(); print('โœ… Deck created with', len(d.cards), 'cards')"

๐Ÿ“– Documentation

  • ๐Ÿ“‹ WORKING.md - Complete technical documentation (2,500+ words)
  • ๐ŸŽฏ Game Rules - Built-in help system
  • ๐Ÿ—๏ธ Architecture - System design overview
  • ๐Ÿ”ง API Reference - Detailed component documentation

๐ŸŒ Compatibility

Platform Terminal Unicode Colors Status
๐ŸชŸ Windows PowerShell 7+ / Windows Terminal โœ… โœ… ๐ŸŸข Full Support
๐ŸชŸ Windows Command Prompt โš ๏ธ โœ… ๐ŸŸก Limited Unicode
๐ŸŽ macOS Terminal.app / iTerm2 โœ… โœ… ๐ŸŸข Full Support
๐Ÿง Linux Most terminals โœ… โœ… ๐ŸŸข Full Support

๐ŸŽจ Customization

TermiJack currently doesn't support customization through TUI.

๐ŸŽจ Change Card Colors

Edit ui/card_renderer.py:

# Change Hearts to pink instead of red
if suit_name == "Hearts":
    border_color = "bright_magenta"  # Changed from bright_red
    text_color = "bright_magenta"
๐Ÿ’ฐ Modify Starting Money

Edit game.py:

class Player(Hand):
    def __init__(self, starting_cash: int = 2000):  # Changed from 1000
โšก Adjust Animation Speed

Edit ui/animations.py:

def show_dealing_animation(self):
    # ...
    time.sleep(0.5)  # Faster - changed from 1.2

๐Ÿ“Š Project Stats

Code Size Files

Built with โค๏ธ for terminal game enthusiasts


๐Ÿ“„ License

This project is licensed under the MIT License

MIT License - Feel free to use, modify, and distribute!
Perfect for learning, teaching, or just having fun. ๐ŸŽฒ

โญ Star this repo if you enjoyed TermiJack!

About

๐Ÿƒ Brings the excitement of Las Vegas Blackjack straight to your terminal with beautiful ASCII art cards, smooth animations, and an interface that makes you feel like a real casino table. ๐Ÿ’ฐ

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors

Languages