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 🙏

© 2026 – Pkg Stats / Ryan Hefner

maid-poker-cli

v1.0.1

Published

女仆扑克牌 (Maid Poker) - A Command Line Dou Dizhu Game

Readme

Maid Poker (女仆扑克牌)

A command-line multiplayer Dou Dizhu (斗地主) game built with Node.js and Socket.io.

Features

  • Multiplayer: Host and join games over local network.
  • Two Game Modes:
    • 三人斗地主 (1副牌, 标准规则)
    • 四人斗地主 (2副牌, 扩展规则)
  • Beautiful UI: ASCII art for cards, special effects for Bombs, Planes, and Rockets.
  • Interactive: Easy-to-use CLI interface.
  • Rules: Complete Dou Dizhu rules with robust card validation.

Installation

npm install -g maid-poker-cli

Usage

Start the game:

maid-poker

Hosting

  1. Select "创建游戏 (Host Game)".
  2. Choose game mode (三人/四人斗地主).
  3. Share your IP address with friends.
  4. Wait for players to join.

Joining

  1. Select "加入游戏 (Join Game)".
  2. Enter the Host's IP address.
  3. Enjoy!

Game Modes

三人斗地主 (Three Player Mode)

  • 牌组: 1副牌 (54张)
  • 发牌: 每人17张, 3张底牌
  • 玩家: 3人 (1地主 vs 2农民)

牌型

| 牌型 | 说明 | 示例 | |------|------|------| | 单张 | 单张牌 | 7 | | 对子 | 两张相同 | QQ | | 三张 | 三张相同 | 888 | | 三带一 | 三张 + 1张单牌 | 888+6 | | 三带对 | 三张 + 1对 | 888+66 | | 顺子 | 5张及以上连牌 (不含2和王) | 34567 | | 连对 | 3对及以上连续对子 | 778899 | | 飞机 | 2组及以上连续三张 | 333444 | | 炸弹 | 4张相同 | 6666 | | 王炸 | 大王 + 小王 (最强) | 🃏🃏 |

四人斗地主 (Four Player Mode)

  • 牌组: 2副牌 (108张)
  • 发牌: 每人25张, 8张底牌
  • 玩家: 4人 (1地主 vs 3农民)

新增/修改牌型

| 牌型 | 说明 | 示例 | |------|------|------| | 顺子 | 5张及以上连牌,可含2,不含王 | 34567, JQKA2 | | 四带二 | 4张相同 + 2张单牌 | 9999+6+8 | | 四带两对 | 4张相同 + 2对 | 9999+55+77 | | 王炸 | 大王 + 小王 | 🃏🃏 | | 八炸 | 8张相同牌 (2副牌独有) | 88888888 | | 天王炸 | 4张王 (最强) | 🃏🃏🃏🃏 |

炸弹大小顺序 (四人模式)

天王炸 (4王) > 八炸 (8张相同) > 王炸 (1大1小) > 普通炸弹 (4张相同)

同级别炸弹比较点数大小 (如 2222 > AAAA > KKKK...)

Development

# Install dependencies
npm install

# Run in development mode
npm start

# Run tests
npm test

# Build for production
npm run build

Testing

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

License

ISC