Port Hedland, Townsville and Alice Springs; the wet season up north (closes #255)
Three cities in the gaps of northern Australia, Telstraya everywhere, Hocus Pocus in Port Hedland and Townsville, Aussie Boyband in Townsville. Port Hedland lands the No Worries Cable System up to Darwin (the real NWCS) and a Port Hedland-Singapore pair on the Darwin Award Cable (the DJSC interconnect onto the ASC). Alice Springs has no cable and its only facility is an old telegraph station. Cities in the tropical north (Darwin, Port Hedland, Townsville) are wet: from November to April a cut on land there takes twice as long to reach, with its own message. The real DigiCo, iseek, NEXTDC, NWCS and DJSC names go on the blocklist.
This commit is contained in:
parent
2a503b223e
commit
4d609d996f
15 changed files with 94 additions and 9 deletions
42
tests/au-north.test.js
Normal file
42
tests/au-north.test.js
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
// #255: northern Australia. Port Hedland lands the cable up to Darwin and the one out to Singapore, Townsville is North
|
||||
// Queensland's data centre, Alice Springs sits in the middle with no sea at all. In the wet season (November to April)
|
||||
// a cut on land in the tropical north takes twice as long to reach.
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const { load } = require('./harness');
|
||||
|
||||
const J = (ev, code) => JSON.parse(ev(`JSON.stringify(${code})`));
|
||||
|
||||
test('#255 Port Hedland, Townsville and Alice Springs are on the map and playable', () => {
|
||||
const { ev, errors } = load();
|
||||
for (const c of ['phe', 'tsv', 'asp']) {
|
||||
const x = J(ev, `(({cc,land,reg,au})=>({cc,land,reg,au}))(CITY.${c})`);
|
||||
assert.deepEqual(x, { cc: 'AU', land: 'oc', reg: 'OC', au: true }, c);
|
||||
assert.ok(ev(`homeOk('${c}')`), `${c} can be a home city`);
|
||||
assert.ok(ev(`NETS.some(n=>n.id==='tsy'&&n.pops.includes('${c}')&&sellsAt(n,'${c}'))`), `${c}: Telstraya sells transit there`);
|
||||
}
|
||||
const cabs = (c) => J(ev, `CABLE_PAIRS.filter(p=>p.a==='${c}'||p.b==='${c}').map(p=>p.a==='${c}'?p.b:p.a).sort()`);
|
||||
assert.deepEqual(cabs('phe'), ['drw', 'sin'], 'Port Hedland: up the coast to Darwin, out to Singapore');
|
||||
assert.deepEqual(cabs('asp'), [], 'Alice Springs has no sea');
|
||||
assert.deepEqual(cabs('tsv'), [], 'Townsville is reached over land');
|
||||
assert.equal(ev("CAB.nwcs.name"), 'No Worries Cable System');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('#255 the wet season doubles the time to reach a cut in the tropical north, and only there', () => {
|
||||
const { ev, errors } = load();
|
||||
ev("ACT.start({});S.cash=1e9;S.lvl=6;for(const g of GOALS)S.done[g.id]=0;S.nextFail=S.nextEvent=1e9;");
|
||||
const cut = (a, b, month) => {
|
||||
ev(`S.day=dayOf(cal(S.day).y,${month},15);S.inc=[];S.links=[{id:'l',a:'${a}',b:'${b}',kind:'wave',sub:false,tier:0,km:kmBetween('${a}','${b}'),cut:0,mo:1000}];compute();`);
|
||||
ev("Math.random=(()=>{let s=7;return()=>{s=(s*16807)%2147483647;return s/2147483647;};})();fireFailure('cut')");
|
||||
const i = J(ev, "S.inc.find(i=>i.type==='cut')");
|
||||
return { days: i.until - ev('S.day'), msg: i.msg };
|
||||
};
|
||||
const wet = cut('tsv', 'bne', 0), dry = cut('tsv', 'bne', 6), south = cut('syd', 'mel', 0);
|
||||
assert.equal(wet.days, dry.days * 2, 'January takes twice as long as July in Townsville');
|
||||
assert.match(wet.msg, /wet season washed out the track/);
|
||||
assert.doesNotMatch(dry.msg, /wet season/);
|
||||
assert.equal(south.days, dry.days, 'Sydney–Melbourne has no wet season');
|
||||
assert.equal(ev("CITY.drw.wet&&CITY.phe.wet&&!CITY.asp.wet"), true, 'Darwin is tropical too; Alice Springs is desert');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
|
@ -94,9 +94,9 @@ const REAL_NAMES = [
|
|||
// eyeballs and incumbents
|
||||
'A1', 'A1 Telekom Austria', 'AIS', 'Airtel', 'Algérie Télécom', 'Altibox', 'Altice', 'America Movil', 'Angola Cables', 'Antel', 'ASTCA', 'Aussie Broadband', 'Bell', 'Bell Canada', 'Belong', 'Bemobile', 'Brisanet', 'BT', 'BTC', 'Cable & Wireless', 'Cable Bahamas', "CAN'L", 'Canal+', 'CANTV', 'CelcomDigi', 'China Mobile', 'China Telecom', 'China Unicom', 'Chunghwa Telecom', 'Citymesh', 'Claro', 'Comcast', 'Cosmote', 'Cox', 'CV Telecom', 'Deutsche Telekom', 'Dhiraagu', 'Dialog', 'Digi', 'Digicel', 'Djezzy', 'Djibouti Telecom', 'DNA', 'Docomo', 'Docomo Pacific', 'Dodo', 'du', 'Eastlink', 'Elisa', 'Emtel', 'Entel', 'ER-Telecom', 'Etisalat', 'ETECSA', 'Ethio Telecom', 'Exetel', 'Far EasTone', 'Fastweb', 'FINTEL', 'Flow', 'Free', 'Frontier', 'GCI', 'Globe', 'Google Fiber', 'Grameenphone', 'GSL Networks', 'GTA', 'Hawaiian Telcom', 'HKBN', 'HKT', 'iiNet', 'Jazz', 'Jio', 'KDDI', 'KPN', 'KT', 'Kyivstar', 'Launtel', 'Leaptel', 'LG U+', 'Liberty Latin America', 'lifecell', 'LMT', 'Magyar Telekom', 'Maroc Telecom', 'Mascom', 'Mauritius Telecom', 'MegaFon', 'MEO', 'Mobily', 'Movicel', 'Movistar', 'Movitel', 'MTC', 'MTN', 'mts', 'Neptune', 'Netvigator', 'Norlys', 'NOS', 'Nova', 'NTA', 'NTT Docomo', 'Oi', 'Omantel', 'One Communications', 'One NZ', 'Ooredoo', 'OPT', 'Optimum', 'Optus', 'Palau Mobile', 'Paradise Mobile', 'Pentanet', 'PLDT', 'PNCC', 'POST', 'Proximus', 'PTCL', 'Reliance Jio', 'Robi', 'Rogers', 'Rostelecom', 'Safaricom', 'SFR', 'Síminn', 'SK Broadband', 'Sky', 'SLT', 'Sonic', 'Spark', 'Spectrum', 'Spintel', 'Starlink', 'StarHub', 'STC', 'Superloop', 'Sure', 'Swisscom', 'T-Mobile', 'Tango', 'TCC', 'TDC', 'Tele2', 'Telecel', 'Telecom Argentina', 'Telecom Egypt', 'Telecom Fiji', 'Telecom Namibia', 'Telekom Malaysia', 'Telekom Srbija', 'Telenet', 'Telenor', 'Telikom PNG', 'Telkomsel', 'Telma', 'Telmex', 'TelOne', 'Telstra', 'Telus', 'Tet', 'TIM', 'Tigo', 'TPG', 'True', 'True Move', 'TSTT', 'Turk Telekom', 'Unitel', 'UPC', 'Verizon', 'Viettel', 'Vini', 'Virgin Media', 'Vivacom', 'Vivo', 'VNPT', 'Vocus', 'Yas', 'Yettel', 'YouSee', 'Zeop',
|
||||
// exchanges and data centers
|
||||
'AMS-IX', 'Any2', 'BCIX', 'CoreSite', 'DE-CIX', 'Digital Realty', 'Equinix', 'France-IX', 'Interxion', 'IX.br', 'JPIX', 'LINX', 'NAPAfrica', 'NetIX', 'NIX', 'NL-ix', 'SIX', 'Telehouse',
|
||||
'AMS-IX', 'Any2', 'BCIX', 'CoreSite', 'DE-CIX', 'DigiCo', 'Digital Realty', 'Equinix', 'France-IX', 'Interxion', 'iseek', 'IX.br', 'JPIX', 'LINX', 'NAPAfrica', 'NetIX', 'NEXTDC', 'NIX', 'NL-ix', 'SIX', 'Telehouse',
|
||||
// cables
|
||||
'2Africa', 'Amitié', 'Dunant', 'EllaLink', 'Equiano', 'Grace Hopper', 'Hibernia Express', 'Jupiter', 'MAREA', 'PEACE', 'SEA-ME-WE 6',
|
||||
'2Africa', 'Amitié', 'Darwin-Jakarta-Singapore Cable', 'Dunant', 'EllaLink', 'Equiano', 'Grace Hopper', 'Hibernia Express', 'Jupiter', 'MAREA', 'North West Cable System', 'PEACE', 'SEA-ME-WE 6',
|
||||
// cable ships, their operators and maintenance clubs
|
||||
'ACMA', 'ASEAN Explorer', 'ASEAN Protector', 'ASEAN Restorer', 'Cable Innovator', 'Cable Retriever', 'Global Marine', 'Léon Thévenin', 'MECMA', 'Orange Marine', 'Pierre de Fermat', 'René Descartes', 'SEAIOCMA', 'Sophie Germain', 'Sovereign', 'Wave Sentinel', 'Yokohama Zone',
|
||||
// vendors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue