Follow-up to #285: Columbus III-and-a-half comes ashore near Cádiz
It never landed on the Biscay coast: its Spanish landing was Conil, on the Gulf of Cádiz, between Lisbon and the Mediterranean. Its Miami pair keeps ending at Madrid, as on main, so saves with a Columbus link keep it.
This commit is contained in:
parent
96062ed114
commit
b2dddf8f06
5 changed files with 19 additions and 8 deletions
|
|
@ -20,18 +20,17 @@ test('Bilbao is on the map, on land and ready to take a POP; it has no exchange
|
|||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('every transatlantic cable that came ashore on the Biscay coast lands at Bilbao', () => {
|
||||
test('the transatlantic cables that come ashore on the Biscay coast land at Bilbao', () => {
|
||||
const { ev, errors } = load();
|
||||
ev("ACT.start({})");
|
||||
const lands = id => JSON.parse(ev(`JSON.stringify(CABLES.find(c=>c.id==='${id}').pairs.map(p=>p.slice(0,2)))`));
|
||||
assert.deepEqual(lands('marea'), [['ash', 'bio']]);
|
||||
assert.deepEqual(lands('grace'), [['nyc', 'lon'], ['nyc', 'bio']]);
|
||||
assert.ok(lands('sol').some(p => p.join() === 'pdl,bio'));
|
||||
assert.ok(lands('col3').some(p => p.join() === 'mia,bio'));
|
||||
for (const [id, a, b] of [['marea', 'ash', 'bio'], ['grace', 'nyc', 'bio'], ['sol', 'pdl', 'bio'], ['col3', 'mia', 'bio']]) {
|
||||
for (const [id, a, b] of [['marea', 'ash', 'bio'], ['grace', 'nyc', 'bio'], ['sol', 'pdl', 'bio']]) {
|
||||
assert.equal(ev(`cablesFor('${a}','${b}').map(c=>c.cid).includes('${id}')`), true, `${id} lands at Bilbao`);
|
||||
}
|
||||
for (const id of ['marea', 'grace', 'sol', 'col3']) {
|
||||
for (const id of ['marea', 'grace', 'sol']) {
|
||||
assert.equal(ev(`CABLE_PAIRS.some(p=>p.cid==='${id}'&&(p.a==='mad'||p.b==='mad'))`), false, `${id} no longer ends at Madrid`);
|
||||
}
|
||||
assert.deepEqual(errors, []);
|
||||
|
|
@ -64,3 +63,15 @@ test('Marea leaves the American coast at Virginia Beach, not New Jersey, so its
|
|||
assert.ok(pts.every(([lo, la]) => ev(`(()=>{const p=proj(${lo},${la});return !onLand(p[0],p[1])})()`)), 'every waypoint is at sea');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('Columbus III-and-a-half comes ashore in the south, near Cadiz, not on the Biscay coast', () => {
|
||||
const { ev, errors } = load();
|
||||
ev(start);
|
||||
const pair = JSON.parse(ev("JSON.stringify(CABLES.find(c=>c.id==='col3').pairs.find(p=>p[0]==='mia'&&p[1]==='mad'))"));
|
||||
assert.ok(pair, 'Miami to Madrid, as before, so old saves keep their Columbus links');
|
||||
const last = pair[2][pair[2].length - 1];
|
||||
assert.ok(last[1] < 37 && last[0] > -7 && last[0] < -5.5, `it lands on the Gulf of Cadiz (${last})`);
|
||||
assert.equal(ev("cablesFor('mia','bio').some(c=>c.cid==='col3')"), false, 'not at Bilbao');
|
||||
assert.ok(pair[2].every(([lo, la]) => ev(`(()=>{const p=proj(${lo},${la});return !onLand(p[0],p[1])})()`)), 'every waypoint is at sea');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -795,7 +795,7 @@ test('Atlantic islands and Halifax: real landings, real exchanges only, and isla
|
|||
assert.equal(ev(`NETS.filter(n=>n.type!=='t1'&&n.pops.some(c=>${JSON.stringify(isl)}.includes(c))&&!(n.up||[]).some(u=>NET[u].type==='t1')&&!n.pops.some(c=>!${JSON.stringify(isl)}.includes(c))).map(n=>n.id).join()`), '');
|
||||
const hop = (path) => ev(`Math.min(...${JSON.stringify(path)}.slice(1).map((c,i)=>Math.max(...cablesFor(${JSON.stringify(path)}[i],c).map(p=>subCarrier(p.km)))))`);
|
||||
const direct = (a, b) => ev(`Math.max(...cablesFor('${a}','${b}').map(p=>subCarrier(p.km)))`);
|
||||
assert.equal(direct('mia', 'bio'), 1200);
|
||||
assert.equal(direct('mia', 'mad'), 1200);
|
||||
assert.equal(hop(['mia', 'bda', 'pdl', 'bio']), 1600, 'Florida to Spain via Bermuda and the Azores');
|
||||
assert.equal(hop(['mia', 'pdl', 'lis']), 1600, 'Florida to Lisbon via the Azores');
|
||||
assert.equal(direct('atn', 'lis'), 1200);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const PLAY = {
|
|||
win: [25, 120], cheese: [...home('hnl'), ...home('lax'), ...home('syd'), ['link', 'lax', 'tok', 1, 'jup'], ['link', 'lax', 'syd', 3, 'hwk'], ['loans']], by: null },
|
||||
// The win day swings with the seed (34 to 58 over five seeds in 2.5.0), so the floor sits below that spread.
|
||||
atl: { ref: [['bb', 'pdl'], ['tr', 'pdl', 1], ...home('mia'), ...home('mad'), ...home('lis'), HIRE, ['link', 'mia', 'bda', 4, 'sol'], ['link', 'bda', 'pdl', 4, 'sol'], ['pop', 'bio'], ['link', 'pdl', 'bio', 4, 'sol'], ['link', 'bio', 'mad', 4], ['served', 90], ['link', 'lis', 'tci', 4, 'ace'], ['link', 'tci', 'lag', 4, 'twoaf'], ['bb', 'lag']],
|
||||
win: [30, 120], cheese: [['bb', 'pdl'], ['tr', 'pdl', 1], ...home('mia'), ...home('mad'), ...home('lis'), ['pop', 'bio'], ['link', 'mia', 'bio', 3, 'col3'], ['link', 'lis', 'lag', 3, 'equi'], ['loans']], by: null },
|
||||
win: [30, 120], cheese: [['bb', 'pdl'], ['tr', 'pdl', 1], ...home('mia'), ...home('mad'), ...home('lis'), ['link', 'mia', 'mad', 3, 'col3'], ['link', 'lis', 'lag', 3, 'equi'], ['loans']], by: null },
|
||||
};
|
||||
|
||||
test('C1 played: every scenario has a reference strategy and a shortcut that fails', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue