npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

tblackjack

v0.4.2

Published

A simple blackjack game for the terminal

Downloads

442

Readme

tBlackjack 🎲

npm version License: MIT

A terminal-based Blackjack game built with Ink and ♠️ ink-playing-cards ♥️

tBlackjack Demo

Features 🎯

Core Gameplay

  • 🎲 Standard Blackjack rules with dealer hit on soft 17
  • 🎨 Beautiful terminal UI using React Ink
  • 🃏 Realistic playing card rendering
  • ⚡️ Fast and responsive gameplay

Interactive Experience

  • 🤖 Animated dealer AI with personality
  • 💭 Real-time dealer thought process
  • 🎮 Intuitive keyboard controls
  • 📊 Real-time game statistics
  • 🔄 Smart deck management with shuffle animations

Game Features

  • 📈 Session statistics tracking
  • 🎯 Hand evaluation and scoring
  • 📖 Built-in help and instructions
  • 🎨 Color-coded messages and status updates

Installation 💻

Play instantly with npx

npx tblackjack

Or install globally

npm install -g tblackjack

How to Play 🎮

  1. Start the game:

    tblackjack
  2. Controls:

    • S - Stand (end your turn)

    • H - Hit (draw a card)

    • N - New game (after round ends)

    • TAB - Toggle statistics

    • Q - Quit game

    During welcome screen:

    • S - Start game
    • H - Toggle help
    • Q - Quit game

Game Rules 📋

Card Values

  • Number cards (2-10) are worth their face value
  • Face cards (J, Q, K) are worth 10
  • Aces are worth 1 or 11 (automatically optimized)

Gameplay

  • Try to get as close to 21 as possible without going over
  • Dealer must hit on soft 17 (Ace counted as 11)
  • Dealer must stand on hard 17 or higher
  • Blackjack (Ace + 10-value card) beats regular 21

Actions

  • Hit: Draw another card
  • Stand: End your turn

Winning

  • Beat the dealer's hand without going over 21
  • Win automatically if dealer busts (goes over 21)
  • Push (tie) if your score equals dealer's
  • Lose if you bust or dealer has higher score

Development 🛠️

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Setup

  1. Clone the repository:

    git clone https://github.com/gfargo/tblackjack.git
    cd tblackjack
  2. Install dependencies:

    npm install
  3. Start development mode:

    npm run dev

Building

npm run build

Testing

npm test

Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments 🙏

Support 💖

If you find this project helpful, please consider giving it a ⭐️ on GitHub!

Want to contribute? Check out our Contributing Guidelines or pick up one of the roadmap items!