Play a Command‑Line Dou Dizhu Game with Ratel: Setup, Commands, and Rules
Ratel is a command‑line multiplayer Dou Dizhu (斗地主) game; this guide shows how to clone the GitHub repository, run the server and client (or connect to a public server), set nicknames, create or join rooms, use card aliases, and control the game with simple commands.
What is Ratel
Ratel is a command‑line implementation of the Chinese card game Dou Dizhu (斗地主). It consists of a server process that manages rooms and a client that connects via TCP and accepts text commands.
Getting the source
Clone the Git repository: git clone https://github.com/ainilili/ratel.git The source code is organized into the landlords-server and landlords-client modules.
Running the server
Build the project with Maven (or download a pre‑built JAR from the releases page). The server JAR is named landlords-server-<em>VERSION</em>.jar. Start it with:
java -jar landlords-server/target/landlords-server-<em>VERSION</em>.jar -p 1024The -p option selects the listening TCP port (default 1024). Replace VERSION with the actual release tag, e.g. 1.0.0.
Running the client
Start the client JAR similarly:
java -jar landlords-client/target/landlords-client-<em>VERSION</em>.jar -p 1024 -h 127.0.0.1The -h option specifies the server host (use 39.105.65.8 to connect to the public server). The -p option must match the server port.
Basic workflow
After connecting, the client prompts for a nickname:
Connection to server successful, welcome to ratel !!
Please set your nickname
[ratel@nickname]$ NicoThen an options menu is displayed:
Create Room
Room List
Join Room
Enter the corresponding number. Creating a room returns an identifier and waits for other players:
[ratel@options]$ 1
You have created room with id 2
Please wait for other players to join !Card notation
Cards are entered using short aliases:
Numbers 3‑9 represent themselves. 0 represents 10. J / j for Jack. Q / q for Queen. K / k for King. A / a for Ace. 1 for 2. S / s for the small joker. X / x for the big joker.
Examples:
7890j // straight 7‑8‑9‑10‑J
sx // king bomb (both jokers)In‑game commands
pass– skip the current turn. exit – leave the game.
Reference URLs
Repository: https://github.com/ainilili/ratel
Release page (contains pre‑built JARs): https://github.com/ainilili/ratel/releases
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
