What’s this?
This is Ratel, which can play a simple game of fighting landlord on the command line. Here’s a picture to try it out:
How to start playing?
Ratel is a client and a server. You can start a local client and let your clients connect to your server, or directly connect to your public network server, IP 39.105.65.8 Port 1024, but as a player, the most important thing is to use the client!
You can Clone the Ratel project locally and import it into your IDE to play!
git clone https://github.com/ainilili/ratel.git
Copy the code
Then open the SimpleClient class in the landlords-client module to start running.
You can start with a JAR package
Download the Release version github.com/ainilili/ra…
Then go to the download directory and execute the command
java -jar landlords-server/target/landlords-server-#{version}.jar -p 1024
java -jar landlords-client/target/landlords-client-#{version}.jar -p 1024 -h 127.0.0.1
Copy the code
#{version} specifies the current Release version, -p specifies the port, -h specifies Host, here can switch to 121.5.140.133
Started to play?
The Ratel client interacts with the server by entering commands on the command line. The first thing to do after connecting to the server is to set up the nickname
Connection to server successful, welcome to ratel !!
Please set your nickname
[ratel@nickname]$ Nico
Copy the code
I’ll set the nickname to Nico, which will bring me to the palette
Options:
1. Create Room
2. Room List
3. Join Room
Please enter the number of options
[ratel@options]$
Copy the code
At this point we can create rooms, view room lists and join rooms, no nonsense, first create one and then!
[ratel@options]$ 1
You has been create room with id 2
Please wait for other players to join !
Copy the code
All right, hold your horses. What? Waiting too long?
Well, if you feel like no one is dating, you can join the Ratel experience QQ group 948365095
When the full three people, the game will begin, then it is time to explain the rules of card selection!
┌ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ │ 3 4 5 6 7 | | | | | 8 9 10 | | | | | Q J K | A | 2 | S | | X │ ♦ | ♦ | ♦ | ♦ | ♦ | ♦ | ♦ | ♦ | ♦ | ♦ | ♦ | ♦ | ♦ | | | └ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘Copy the code
This is the result of ranking 3 to king according to the rule of small to large
If you think of the sequence
┌ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ ─ ─ ┐ │ 7 8 9 10 | | | | | J │ ♦ | ♦ | ♦ | ♦ | ♦ | └ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘ ─ ─ ┘Copy the code
You can type 7890j or 789tj
If you want to fry wang
┌ ─ ─ ┐ ─ ─ ┐ │ S | | X │ | | └ ─ ─ ┘ ─ ─ ┘Copy the code
You can type in sx
This is the alias mapping rule for all cards
Poker - > │ 3 4 5 6 7 | | | | | 8 9 10 | | | | | Q J K | A | 2 | S | | X alias - > │ 3 4 5 6 7 | | | | | | 9 8 0 | | T T J J | Q Q | | K K aa 1 2 | | S | S X x|Copy the code
- If you don’t want to play this turn, you can
pass
- If you want to quit the game during this turn, you can enter
exit
When you’re not busy at work, it’s nice to relax with a little Ratel paddle.
Finally put the project address: github.com/ainilili/ra…