dou-cl 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -15
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -11,16 +11,47 @@
|
|
|
11
11
|
<p align="center"><b>一个伪装成开发控制台的命令行牌桌。</b></p>
|
|
12
12
|
|
|
13
13
|
跑起来就是一屏正常的开发输出:服务端日志、`xxd` 转储、JSON 帧、git diff。
|
|
14
|
-
|
|
14
|
+
里面其实是**斗地主 / 跑得快 / 510K**,牌局信息一条不删,只是换了层壳。
|
|
15
15
|
工位上扫一眼屏幕的人,只会觉得你在看构建日志。
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npx dou-cl
|
|
19
|
-
npx dou-cl
|
|
18
|
+
npx dou-cl --join 43.159.48.211:10001 # 进公共房间,和真人打
|
|
19
|
+
npx dou-cl # 单机,电脑陪打
|
|
20
|
+
npx dou-cl -g doudizhu # 跳过菜单直接开局(最隐蔽)
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
25
|
+
## 公共房间
|
|
26
|
+
|
|
27
|
+
有人开了一台公共服务器:**`43.159.48.211`,端口 `10000`–`12000`,一共 2001 个房间。**
|
|
28
|
+
|
|
29
|
+
每个端口是一个独立房间,**随便挑一个进去就行** —— 或者可以和朋友约定一个端口。
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx dou-cl --join 43.159.48.211:10001
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- 人不够会一直等着,**人齐了自动开局**;等的时候敲 `s` 让电脑先补上,`q` 退出
|
|
36
|
+
- 人满了会直接告诉你(`room full`),**换个端口**再试即可
|
|
37
|
+
- 只想自己练手就 `npx dou-cl`,单机三位电脑陪打
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 局域网联机
|
|
42
|
+
|
|
43
|
+
**一个 `ip:port` 就是一个房间**,服务器自己不占座位,只是托管。
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx dou-cl --serve --port 8080 -g doudizhu # 本机开一个房间
|
|
47
|
+
npx dou-cl --join 192.168.1.10:8080 # 同事连进来,地址就是房间号
|
|
48
|
+
npx dou-cl --serve --ports 10000-12000 # 一次开一片,每个端口一个独立房间
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
换皮肤、`reveal` 这类纯本地的操作**任何时刻都能用**,不用等你的回合。
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
24
55
|
## 四种伪装
|
|
25
56
|
|
|
26
57
|
**`log`(默认)** —— 服务端日志流。看 `hand[...]` / `peers=[...]` / `table=`。
|
|
@@ -75,7 +106,7 @@ npx dou-cl --skins # 列出全部
|
|
|
75
106
|
| 操作 | 写法 |
|
|
76
107
|
| --- | --- |
|
|
77
108
|
| 出牌 | 直接敲点数:`34567` 或 `3 4 5 6 7`;指定花色 `5s 5h` |
|
|
78
|
-
| 不要 / 提示 / 帮助 / 退出 | `p` / `h` / `?` / `
|
|
109
|
+
| 不要 / 提示 / 帮助 / 退出 | `p` / `h` / `?` / `q` |
|
|
79
110
|
| 看真身 / 换皮肤 / 重画 | `reveal` / `skin <名>` / `redraw` |
|
|
80
111
|
|
|
81
112
|
同花顺、五十K **不用管花色**,直接敲 `56789` / `50K`,程序自动挑同花色那组。
|
|
@@ -90,17 +121,6 @@ npx dou-cl --skins # 列出全部
|
|
|
90
121
|
| **跑得快** | 3 | 一副牌去大小王,持 ♠3 者先出且首手必带 ♠3 |
|
|
91
122
|
| **510K** | 4 | 两副牌,5/10/K 计分;五十K 是通吃牌型 |
|
|
92
123
|
|
|
93
|
-
联网只有一条规则:**一个 `ip:port` 就是一个房间**。服务器自己不占座位。
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
npx dou-cl --serve --port 8080 -g doudizhu # 本机开一个房间
|
|
97
|
-
npx dou-cl --join 192.168.1.10:8080 # 别人连进来,地址本身就是房间
|
|
98
|
-
npx dou-cl --serve --ports 10000-12000 # 一次开一片,每个端口一个独立房间
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
人满了直接回绝;人不够就等着 —— 随时能退出,也能敲一下让电脑补齐先开局。
|
|
102
|
-
换皮肤、`reveal` 这类纯本地的操作**任何时刻都能用**,不用等你的回合。
|
|
103
|
-
|
|
104
124
|
---
|
|
105
125
|
|
|
106
126
|
## License
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dou-cl",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "伪装成开发控制台的命令行牌桌 —— 斗地主 / 跑得快 / 510K
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "伪装成开发控制台的命令行牌桌 —— 斗地主 / 跑得快 / 510K,牌局藏在日志流、xxd、JSON 或 git diff 里;支持局域网联机,也有公共房间可直接和真人开局",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"doudizhu",
|
|
7
7
|
"斗地主",
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"card-game",
|
|
13
13
|
"terminal",
|
|
14
14
|
"tui",
|
|
15
|
-
"stealth"
|
|
15
|
+
"stealth",
|
|
16
|
+
"multiplayer",
|
|
17
|
+
"lan"
|
|
16
18
|
],
|
|
17
19
|
"license": "MIT",
|
|
18
20
|
"author": "iguangyu",
|