feat: add gift zone city team and mashup mode
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
classifyDeadlock,
|
||||
evaluateBoard,
|
||||
generateBoard,
|
||||
generateMashupBoard,
|
||||
} from '../js/gameplay/difficulty/index.js'
|
||||
|
||||
test('generateBoard is deterministic for the same city, level, and seed', () => {
|
||||
@@ -72,3 +73,23 @@ test('classifyDeadlock identifies a hard deadlock when slot is full and no match
|
||||
|
||||
assert.equal(result.type, 'hard')
|
||||
})
|
||||
|
||||
test('generateMashupBoard is deterministic and mixes unlocked city content', () => {
|
||||
const contentSystem = createContentSystem()
|
||||
|
||||
const first = generateMashupBoard({
|
||||
cityIds: ['beijing', 'tokyo'],
|
||||
seed: 33001,
|
||||
contentSystem,
|
||||
})
|
||||
const second = generateMashupBoard({
|
||||
cityIds: ['beijing', 'tokyo'],
|
||||
seed: 33001,
|
||||
contentSystem,
|
||||
})
|
||||
|
||||
assert.deepEqual(first.pieces, second.pieces)
|
||||
assert.deepEqual(first.overlapGraph, second.overlapGraph)
|
||||
assert.deepEqual(first.sourceCityIds, ['beijing', 'tokyo'])
|
||||
assert.ok(new Set(first.elementDefinitions.map((entry) => entry.sourceCityId)).size >= 2)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user