Puzzles: a POP in a thin market counts its higher monthly rent

The puzzle price and the city panel now use the city's own monthly POP rent
(Suva is 1.5x), not the plain one, matching the higher setup already charged.
This commit is contained in:
Frederic Jung 2026-10-28 19:36:12 +01:00
parent 19a9c60fd5
commit 843811956b
No known key found for this signature in database
3 changed files with 13 additions and 2 deletions

View file

@ -263,3 +263,14 @@ test('puzzles in every language', () => {
assert.deepEqual(errors, [], lang);
}
});
test('a POP in a thin market costs its higher monthly rent too, and the panel says so', () => {
const { ev, errors } = load();
ev("pzBegin(pzDef('kiwi'))");
assert.ok(ev('colo("suv")') > 1, 'Suva is a thin market');
assert.equal(ev("pzPopCost('suv')"), ev("popCost('suv')+12*popMo('suv')"));
assert.ok(ev("pzPopCost('suv')") > ev("popCost('suv')+12*POP_MO"));
ev("selectCity('suv')");
assert.ok(ev("document.getElementById('panelBody').textContent").includes(ev("fmt$(popMo('suv'))") + '/mo'));
assert.deepEqual(errors, []);
});