From e3d2dc314ea6579248a387d88471acbf75581ca3 Mon Sep 17 00:00:00 2001 From: songyih Date: Sun, 12 Jan 2020 23:58:11 -0800 Subject: [PATCH] add sample doudizhu json data file --- server/package.json | 19 +++ server/sample_data/sample_doudizhu.json | 150 ++++++++++++++++++++++++ 2 files changed, 169 insertions(+) create mode 100644 server/package.json create mode 100644 server/sample_data/sample_doudizhu.json diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..cba61ac --- /dev/null +++ b/server/package.json @@ -0,0 +1,19 @@ +{ + "name": "server", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "start": "nodemon index.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.17.1", + "nodemon": "^2.0.2", + "socket.io": "^2.3.0" + } +} diff --git a/server/sample_data/sample_doudizhu.json b/server/sample_data/sample_doudizhu.json new file mode 100644 index 0000000..7305f77 --- /dev/null +++ b/server/sample_data/sample_doudizhu.json @@ -0,0 +1,150 @@ +{ + "initHand": [ + "S2 H2 HK DK HQ CQ DQ CJ S9 H9 D9 C7 S6 H6 C4 D4 S3", + "C2 HA CA DA SQ ST HT D8 S7 H7 C6 D6 S5 H5 C5 S4 H4", + "RJ BJ D2 SA SK CK SJ HJ DJ CT DT C9 S8 H8 C8 D7 D5 H3 S3 D3" + ], + "playerInfo": [ + { + "id": 0, + "index": 0, + "role": "peasant" + }, + { + "id": 0, + "index": 0, + "role": "peasant" + }, + { + "id": 0, + "index": 0, + "role": "landlord" + } + ], + "moveHistory": [ + { + "playerId": 2, + "move": "H3 S3 D3 D5" + }, + { + "playerId": 0, + "move": "S9 H9 D9 S3" + }, + { + "playerId": 1, + "move": "P" + }, + { + "playerId": 2, + "move": "SJ HJ DJ D7" + }, + { + "playerId": 0, + "move": "HQ CQ DQ C7" + }, + { + "playerId": 1, + "move": "P" + }, + { + "playerId": 2, + "move": "P" + }, + { + "playerId": 0, + "move": "C4 D4" + }, + { + "playerId": 1, + "move": "ST HT" + }, + { + "playerId": 2, + "move": "SK CK" + }, + { + "playerId": 0, + "move": "S2 H2" + }, + { + "playerId": 1, + "move": "P" + }, + { + "playerId": 2, + "move": "P" + }, + { + "playerId": 0, + "move": "S6 H6" + }, + { + "playerId": 1, + "move": "P" + }, + { + "playerId": 2, + "move": "CT DT" + }, + { + "playerId": 0, + "move": "HK DK" + }, + { + "playerId": 1, + "move": "P" + }, + { + "playerId": 2, + "move": "RJ BJ" + }, + { + "playerId": 0, + "move": "P" + }, + { + "playerId": 1, + "move": "P" + }, + { + "playerId": 2, + "move": "S8 H8 C8 C9" + }, + { + "playerId": 0, + "move": "P" + }, + { + "playerId": 1, + "move": "HA CA DA H5" + }, + { + "playerId": 2, + "move": "P" + }, + { + "playerId": 0, + "move": "P" + }, + { + "playerId": 1, + "move": "SQ" + }, + { + "playerId": 2, + "move": "D2" + }, + { + "playerId": 0, + "move": "P" + }, + { + "playerId": 1, + "move": "P" + }, + { + "playerId": 2, + "move": "SA" + } + ] +} \ No newline at end of file