feat: integrate room framework and isolated subgame bundles
Complete room UI and protocol integration, move game definitions and resources behind bundle entries, publish authoritative version XML, and document single-game builds. Include all current resource changes and experiment artifacts.
This commit is contained in:
@@ -204,15 +204,18 @@ test('parseLoginResponse 拒绝负数、越界及非整数 seat', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('parseSelfJoinRoomResponse 接受金样,不深验 roomtype/deskinfo 并保留引用', () => {
|
||||
test('parseSelfJoinRoomResponse 接受可传输的 opaque 游戏字段并保留引用', () => {
|
||||
const data = fixture('self-join-room.json').data;
|
||||
const opaqueDeskinfo = new Date();
|
||||
const roomtype = [undefined, { gameDefined: true }];
|
||||
const parsed = parseSelfJoinRoomResponse({ ...data, roomtype, deskinfo: opaqueDeskinfo });
|
||||
const opaqueDeskinfo = { future: { round: 9, unknownCards: [17, 29] } };
|
||||
const roomtype = [null, { gameDefined: true, futureRule: ['unknown', 7] }];
|
||||
const unknownGameField = { nextVersion: ['kept', false] };
|
||||
const parsed = parseSelfJoinRoomResponse({ ...data, roomtype, deskinfo: opaqueDeskinfo, unknownGameField });
|
||||
assert.equal(parsed.state, 0);
|
||||
assert.equal(parsed.room?.roomtype, roomtype);
|
||||
assert.equal(parsed.reconnect.present, true);
|
||||
assert.equal(parsed.reconnect.present && parsed.reconnect.value, opaqueDeskinfo);
|
||||
assert.equal(parsed.raw.unknownGameField, unknownGameField);
|
||||
assert.throws(() => parseSelfJoinRoomResponse({ ...data, roomtype: [undefined, { gameDefined: true }] }), /\$\.data\.roomtype\.0.*finite JSON value/);
|
||||
});
|
||||
|
||||
test('parseSelfJoinRoomResponse defines the optional deskwar default once and deskinfo wins stage', () => {
|
||||
|
||||
Reference in New Issue
Block a user