Skip to content

Commit 2e2042d

Browse files
committed
try to docker
1 parent 400dc17 commit 2e2042d

File tree

6 files changed

+61
-20
lines changed

6 files changed

+61
-20
lines changed

card_game/README.md

+16-17
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66

77
一个字节(8bit)表示一张牌
88
最高位表示无花色(无花色的具体含义要由应用来解释,用于特定的表示)次两位表示花色,后五位表示牌型
9-
* 花色(高三位
9+
* 花色(次高两位
1010
- 000 方块 (如果要去掉花色,可以全部变为00)
1111
- 001 梅花
1212
- 010 红桃
1313
- 011 黑桃
1414

15-
* 牌型
16-
小王 0001 0001 BLACK_JOKER
17-
大王 0001 0010 RED_JOKER
18-
19-
2 2 0010
20-
3 3 0011
21-
...
22-
10 10 1010
23-
J 11
24-
Q 12
25-
K 13
26-
A 14 1110
15+
* 牌型(低五位)
16+
小王 0001 0001 BLACK_JOKER
17+
大王 0001 0010 RED_JOKER
18+
19+
2 2 0010
20+
3 3 0011
21+
...
22+
10 10 1010
23+
J 11
24+
Q 12
25+
K 13
26+
A 14 1110
2727

2828
* 0 1 15 16 禁用
2929
## 手写输入表示法
@@ -41,15 +41,14 @@ s2 ... s0 sJ sQ sK sA
4141

4242
## 命令行展示法
4343

44-
与手写输入法类似,只是花色用字符'♦', '♣', '♥', '♠'来表示
44+
与手写输入法类似,花色用字符'♦', '♣', '♥', '♠'来表示
4545

4646
## python中展示
4747

48-
若不加特定说明,全部为bytearray 好像是一个错误,用list可能更加的方便,确定是可修改很容易被改掉了
48+
用list表示一手牌,注意引用被修改的问题
4949

5050
## 传输编码
51-
有两种,base16 或者 base64,为了简单起见,还是之间base16 节约多少?
52-
base64可以节省3分之一的字节?平时出牌都很简单,所以还是用base16吧
51+
平时出牌都很简单,所以还是用base16吧
5352

5453

5554
# 牌类通用接口设计

http_test/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM python3

http_test/requirements.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
astroid==2.2.5
2+
certifi==2018.10.15
3+
chardet==3.0.4
4+
idna==2.7
5+
isort==4.3.20
6+
lazy-object-proxy==1.4.1
7+
mccabe==0.6.1
8+
pylint==2.3.1
9+
qiniu==7.2.2
10+
requests==2.20.1
11+
six==1.12.0
12+
tornado==5.1.1
13+
typed-ast==1.4.0
14+
urllib3==1.24.1
15+
wrapt==1.11.1

miscellaneous/lizhi_uid.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import urllib.request
2+
3+
fm = 70017363
4+
"""
5+
if len(sys.argv) < 2:
6+
print('please input the phone')
7+
exit()
8+
else:
9+
fm = sys.argv[1]
10+
"""
11+
response = urllib.request.urlopen(f'http://www.lizhi.fm/{fm}/')
12+
13+
raw_body_:bytes = response.read()
14+
raw_body = raw_body_.decode('utf-8')
15+
16+
result_list = re.compile(r"验证码\-\-\-[0-9]+").findall(raw_body)
17+
if len(result_list):
18+
print(f'phone:{phone}, sms code:{result_list[0][-6:]}')
19+
else:
20+
print(f'not find sms code for phone:{phone}')

nginx_conf/nginx.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ http {
1919
listen 8999;
2020
server_name _;
2121
location /static/ {
22-
root /opt;
22+
root /Users/liuzhuzhai/Server;
2323
}
2424

2525
location /testsets/ {

shengji/README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ shengji/rooms/110/
5555

5656

5757

58-
# 高手升级
58+
# 狗屁升级
59+
60+
从接口调用视角来说,一个打牌就是两个参数(uid + 操作),就是说存粹的游戏牌操作。
61+
62+
63+
从客户端的角度来说,就是自己的uid、操作和查看
64+
65+
5966

60-
棋逢对手

0 commit comments

Comments
 (0)