diff options
-rw-r--r-- | data.js | 2 | ||||
-rw-r--r-- | play.js | 108 | ||||
-rw-r--r-- | rules.js | 26 | ||||
-rw-r--r-- | tools/gendata.js | 4 | ||||
-rw-r--r-- | tools/genlayout.py | 12 |
5 files changed, 81 insertions, 71 deletions
@@ -1,2 +1,2 @@ -const data = {"first_space":0,"first_pop":0,"first_city":0,"last_city":10,"first_dept":11,"last_pop":22,"last_dept":28,"first_loc":29,"last_loc":46,"last_space":46,"card_order":[null,[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,3,2],[0,1,3,2],[0,1,3,2],[0,2,1,3],[0,2,1,3],[0,2,1,3],[0,2,3,1],[0,2,3,1],[0,2,3,1],[0,3,1,2],[0,3,1,2],[0,3,1,2],[0,3,2,1],[0,3,2,1],[0,3,2,1],[1,0,2,3],[1,0,2,3],[1,0,2,3],[1,0,3,2],[1,0,3,2],[1,0,3,2],[1,2,0,3],[1,2,0,3],[1,2,0,3],[1,2,3,0],[1,2,3,0],[1,2,3,0],[1,3,0,2],[1,3,0,2],[1,3,0,2],[1,3,2,0],[1,3,2,0],[1,3,2,0],[2,0,1,3],[2,0,1,3],[2,0,1,3],[2,0,3,1],[2,0,3,1],[2,0,3,1],[2,1,0,3],[2,1,0,3],[2,1,0,3],[2,1,3,0],[2,1,3,0],[2,1,3,0],[2,3,0,1],[2,3,0,1],[2,3,0,1],[2,3,1,0],[2,3,1,0],[2,3,1,0],[3,0,1,2],[3,0,1,2],[3,0,1,2],[3,0,2,1],[3,0,2,1],[3,0,2,1],[3,1,0,2],[3,1,0,2],[3,1,0,2],[3,1,2,0],[3,1,2,0],[3,1,2,0],[3,2,0,1],[3,2,0,1],[3,2,0,1],[3,2,1,0],[3,2,1,0],[3,2,1,0],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3]],"card_title":[null,"1st Division","Ospina & Mora","Tapias","Caño Limón - Coveñas","Occidental & Ecopetrol","Oil Spill","7th Special Forces","Fuerza Aérea Colombiana","High Mountain Battalions","Blackhawks","National Defense & Security Council","Plan Colombia","Plan Meteoro","Tres Esquinas","War Tax","Coffee Prices","Madrid Donors","NSPD-18","General Offensive","Mono Jojoy","Raúl Reyes","Alfonso Cano","DoD Contractors","Operación Jaque","Ejército de Liberación Nacional","Gramaje","Misil Antiaéreo","Hugo Chávez","Kill Zone","Peace Commission","Betancourt","Secuestrados","Sucumbíos","Airdropped AKs","Crop Substitution","Zona de Convivencia","Former Military","National Coordination Center","Soldados Campesinos","Demobilization","Mancuso","Senado & Cámara","Calima Front","Colombia Nueva","Los Derechos Humanos","Limpieza","Pinto & del Rosario","Unión Sindical Obrera","Bloques","Carabineros","Pipeline Repairs","Castaño","Criminal Air Force","Deserters & Defectors","DEA Agents","Drogas La Rebaja","Op Millennium","General Serrano","Salcedo","The Chess Player","Air Bridge","Amazonía","Narco-War","Cocaine Labs","Poppies","Tingo María","Mexican Traffickers","Narco-Subs","Riverines & Fast Boats","Ayahuasca Tourism","Darién","Sicarios","Propaganda!","Propaganda!","Propaganda!","Propaganda!"],"card_flavor":[null,"Jointness","COIN experts take charge","CO tightens civil-military bonds","Profitable pipeline","Oil company security","Rebels blamed","Infrastructure protection training","COIN strike aircraft","Elites guard high-altitude corridors","US helos delivered","Military-police jointness","US \"War on Drugs\"","Transport protection units","Forward base","Defense budget shot in the arm","They're up","Aid conference generous","US \"War on Terror\" takes on FARC",null,"KIA puts FARC in disarray","FARC Deputy killed","FARC leader killed in military strike","US provides aircrew","Dramatic hostage rescue","ELN and FARC jockey","FARC protection rejected","FARC MANPADs deemed a myth","Caracas controls border","Army sniffs out FARC trap","FARC accused in Commissioner's killing","Sympathy for famous hostage","Fed up with hostage-taking","Ecuadoran buffer zone","Insurgents scammed by Russian criminals","Government initiative","ELN gets its DMZ","Ties that bind","New command fights paramilitaries","Local forces platoons","Negotiated reintegration","AUC No.2 extradited","Unity behind Presidential war policy","Suspect leftists massacred","Anti-corruption campaign","Officers disciplined","Ruthless elimination","Human rights investigators","AUC targets oil labor organizers","Militias defy Castaño","National police field forces","Speedy patching","AUC leader's memoir a best seller","Insurgent access to small aircraft",null,"Law enforcement assistance","Cali cartel's drugstore chain seized","Colombian-US strike at Bernal syndicate","National Police hammer cartels","Cartel informant","Kingpin strategy scores","Peruvian coca supply controlled","Brasília's Op Cobra blocks border","Rival syndicates go for the throat","FARC taps suppliers","Growers and Government eradication focus on heroin source","Coca crop fails","Major shipment busted en route","Submersibles seized",null,"Eco-tourism helps trade balance","Arms traffic interdicted","Hired drug guns unreliable"],"card_flavor_shaded":[null,"Service parochialism","COIN strategy eludes Army","Civil-military rivalries fester","Pipeline draws attacks","Industry thought exploitative","Multinationals make mess","US training ineffective","Budget diverted to expensive jets","Equipment not delivered","Delivery of US helos delayed","Military-police rivalry","US aid focuses on drug war","Transport security deemphasized","Base overrun","Middle class resents cost of war","They're down","EU aid focuses on reconstruction","US focused on Mid-East and South Asia",null,"Military strategist","FARC Deputy channels foreign support","Ideologue","Plane down - hostage search and evasion","Hostage rescue goes awry","ELN and FARC coordinate ops","Schedule of fees","MANPADs feared","Caracas aids rebels","Tactics lure enemy in","Peace bid","Hostage negotiations forum for FARC","Ransoming highly profitable","Cross-border war","Covert weapons delivery","FARC proposals lauded",null,"Ex-officers advise paramilitaries","Sympathizers alert AUC","Local forces augment autodefensas","Talks a ruse, fighters recycled","AUC drug lord","Insurgent sympathies","Brutality blamed on Army","Political campaign divisive","International human rights cartel",null,"Prosecutors killed","Labor backs FARC","Independent militias join AUC","National police corruption","Security concerns hinder maintenance","Charismatic AUC political leader",null,null,"Más Yanquis","Retail empire","Investigation penetrated","Officials on cartel payroll","Cali cartel security chief","Cali's Gilberto Rodríguez Orejuela expands empire","Colombian coca growers fill Peruvian void","Jungle landing strips",null,"Well-oiled industry",null,"Hearty coca variety","New routes to US market","Littoral stealth",null,"Eco-tourists taken","Border sanctuary","Unemployed ready to work for syndicates"],"card_unshaded_lines":[0,3,2,3,3,3,3,3,2,2,2,2,3,3,3,3,4,3,3,0,3,3,3,3,3,2,3,3,3,3,4,3,4,3,3,3,0,4,4,2,3,3,3,4,4,3,0,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,0,4,0,3,2,3,0,3,3,3],"card_shaded_lines":[0,3,3,3,3,4,4,3,2,3,4,3,4,3,3,3,2,4,4,0,4,4,4,4,4,4,4,4,4,4,3,3,2,4,4,4,0,4,3,3,4,3,4,3,3,4,0,4,4,3,4,4,4,0,0,4,4,4,3,4,4,4,3,0,3,0,4,4,3,0,4,4,4],"space_name":["Bogotá","Cali","Medellín","Bucaramanga","Ibagué","Santa Marta","Cartagena","Cúcuta","Neiva","Pasto","Sincelejo","Atlántico","Chocó","Nariño","Meta West","Guaviare","Putumayo","Cesar","Antioquia","Santander","Huila","Arauca","Meta East","Vichada","Guainía","Vaupés","Amazonas","Ecuador","Panamá","Santa Marta / Cartagena","Cali / Pasto","Neiva / Pasto","Bogotá / San José","Pasto / Tumaco","Cali / Buenaventura","Cartagena / Sincelejo","Sincelejo / Medellín","Medellín / Ibagué","Ibagué / Cali","Bucaramanga / Ibagué / Bogotá","Bogotá / Neiva","Cúcuta / Arauca","Bogotá / Yopal","Santa Marta / Ayacucho","Bucaramanga / Ayacucho","Sincelejo / Ayacucho","Cúcuta / Ayacucho"],"spaces":[{"type":"city","id":"Bogota","pop":8,"adjacent":[14,19,20,22,32,39,40,42]},{"type":"city","id":"Cali","pop":3,"adjacent":[12,13,20,30,34,38]},{"type":"city","id":"Medellin","pop":3,"adjacent":[12,18,36,37]},{"type":"city","id":"Bucaramanga","pop":2,"adjacent":[18,19,39,44]},{"type":"city","id":"Ibague","pop":2,"adjacent":[12,18,20,37,38,39]},{"type":"city","id":"Santa Marta","pop":2,"adjacent":[11,17,29,43]},{"type":"city","id":"Cartagena","pop":1,"adjacent":[11,29,35]},{"type":"city","id":"Cucuta","pop":1,"adjacent":[19,41,46]},{"type":"city","id":"Neiva","pop":1,"adjacent":[14,16,20,31,40]},{"type":"city","id":"Pasto","pop":1,"adjacent":[13,16,20,27,30,31,33]},{"type":"city","id":"Sincelejo","pop":1,"adjacent":[11,12,18,35,36,45]},{"type":"forest","id":"Atlantico","pop":1,"adjacent":[5,6,10,17,18,19,29,35,43,44,45,46]},{"type":"forest","id":"Choco","pop":1,"adjacent":[1,2,4,10,13,18,20,28,34,36,37,38]},{"type":"forest","id":"Narino","pop":1,"adjacent":[1,9,12,20,27,30,33,34]},{"type":"forest","id":"Meta West","pop":1,"adjacent":[0,8,15,16,20,22,32,40]},{"type":"forest","id":"Guaviare","pop":1,"adjacent":[14,16,22,23,24,25,32]},{"type":"forest","id":"Putumayo","pop":1,"adjacent":[8,9,14,15,20,25,26,27,31]},{"type":"mountain","id":"Cesar","pop":1,"adjacent":[5,11,18,19,43,44,45,46]},{"type":"mountain","id":"Antioquia","pop":2,"adjacent":[2,3,4,10,11,12,17,19,20,36,37,39,43,44,45,46]},{"type":"mountain","id":"Santander","pop":2,"adjacent":[0,3,7,11,17,18,20,21,22,39,41,42,43,44,45,46]},{"type":"mountain","id":"Huila","pop":2,"adjacent":[0,1,4,8,9,12,13,14,16,18,19,30,31,38,39,40]},{"type":"grassland","id":"Arauca","pop":1,"adjacent":[19,22,23,41,42]},{"type":"grassland","id":"Meta East","pop":1,"adjacent":[0,14,15,19,21,23,32,42]},{"type":"grassland","id":"Vichada","pop":0,"adjacent":[15,21,22,24]},{"type":"forest","id":"Guainia","pop":0,"adjacent":[15,23,25]},{"type":"forest","id":"Vaupes","pop":0,"adjacent":[15,16,24,26]},{"type":"forest","id":"Amazonas","pop":0,"adjacent":[16,25]},{"type":"grassland","id":"Ecuador","pop":0,"adjacent":[9,13,16,33]},{"type":"forest","id":"Panama","pop":0,"adjacent":[12]},{"type":"road","id":"Santa Marta / Cartagena","econ":1,"adjacent":[5,6,11]},{"type":"road","id":"Cali / Pasto","econ":1,"adjacent":[1,9,13,20]},{"type":"road","id":"Neiva / Pasto","econ":1,"adjacent":[8,9,16,20]},{"type":"road","id":"Bogota / San Jose","econ":1,"adjacent":[0,14,15,22]},{"type":"road","id":"Pasto / Tumaco","econ":1,"adjacent":[9,13,27]},{"type":"pipeline","id":"Cali / Buenaventura","econ":1,"adjacent":[1,12,13]},{"type":"pipeline","id":"Cartagena / Sincelejo","econ":1,"adjacent":[6,10,11]},{"type":"pipeline","id":"Sincelejo / Medellin","econ":2,"adjacent":[2,10,12,18]},{"type":"pipeline","id":"Medellin / Ibague","econ":1,"adjacent":[2,4,12,18]},{"type":"pipeline","id":"Ibague / Cali","econ":1,"adjacent":[1,4,12,20]},{"type":"pipeline","id":"Bucaramanga / Ibague / Bogota","econ":2,"adjacent":[0,3,4,18,19,20]},{"type":"pipeline","id":"Bogota / Neiva","econ":2,"adjacent":[0,8,14,20]},{"type":"pipeline","id":"Cucuta / Arauca","econ":3,"adjacent":[7,19,21,21]},{"type":"pipeline","id":"Bogota / Yopal","econ":2,"adjacent":[0,19,21,22]},{"type":"pipeline","id":"Santa Marta / Ayacucho","econ":2,"adjacent":[5,11,17,18,19,44,45,46]},{"type":"pipeline","id":"Bucaramanga / Ayacucho","econ":2,"adjacent":[3,11,17,18,19,43,45,46]},{"type":"pipeline","id":"Sincelejo / Ayacucho","econ":3,"adjacent":[10,11,17,18,19,43,44,46]},{"type":"pipeline","id":"Cucuta / Ayacucho","econ":3,"adjacent":[7,11,17,18,19,43,44,45]}],"adjacent_patrol":[[32,39,40,42],[30,34,38],[36,37],[39,44],[37,38,39],[29,43],[29,35],[41,46],[31,40],[30,31,33],[35,36,45],[5,6,10,29,35,43,44,45,46],[1,2,4,10,34,36,37,38],[1,9,30,33,34],[0,8,32,40],[32],[8,9,31],[5,43,44,45,46],[2,3,4,10,36,37,39,43,44,45,46],[0,3,7,39,41,42,43,44,45,46],[0,1,4,8,9,30,31,38,39,40],[41,42],[0,32,42],[],[],[],[],[9,33],[],[5,6],[1,9],[8,9],[0],[9],[1],[6,10],[2,10],[2,4],[1,4],[0,3,4],[0,8],[7],[0],[5,44,45,46],[3,43,45,46],[10,43,44,46],[7,43,44,45]],"first_piece":[[0,3,3,33,0],[63,72],[102,108],[126,141]],"last_piece":[[2,2,32,62,-1],[71,101],[107,125],[140,152]]} +const data = {"first_space":0,"first_pop":0,"first_city":0,"last_city":10,"first_dept":11,"last_pop":22,"last_dept":28,"first_loc":29,"last_loc":46,"last_space":46,"card_order":[null,[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,3,2],[0,1,3,2],[0,1,3,2],[0,2,1,3],[0,2,1,3],[0,2,1,3],[0,2,3,1],[0,2,3,1],[0,2,3,1],[0,3,1,2],[0,3,1,2],[0,3,1,2],[0,3,2,1],[0,3,2,1],[0,3,2,1],[1,0,2,3],[1,0,2,3],[1,0,2,3],[1,0,3,2],[1,0,3,2],[1,0,3,2],[1,2,0,3],[1,2,0,3],[1,2,0,3],[1,2,3,0],[1,2,3,0],[1,2,3,0],[1,3,0,2],[1,3,0,2],[1,3,0,2],[1,3,2,0],[1,3,2,0],[1,3,2,0],[2,0,1,3],[2,0,1,3],[2,0,1,3],[2,0,3,1],[2,0,3,1],[2,0,3,1],[2,1,0,3],[2,1,0,3],[2,1,0,3],[2,1,3,0],[2,1,3,0],[2,1,3,0],[2,3,0,1],[2,3,0,1],[2,3,0,1],[2,3,1,0],[2,3,1,0],[2,3,1,0],[3,0,1,2],[3,0,1,2],[3,0,1,2],[3,0,2,1],[3,0,2,1],[3,0,2,1],[3,1,0,2],[3,1,0,2],[3,1,0,2],[3,1,2,0],[3,1,2,0],[3,1,2,0],[3,2,0,1],[3,2,0,1],[3,2,0,1],[3,2,1,0],[3,2,1,0],[3,2,1,0],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3]],"card_title":[null,"1st Division","Ospina & Mora","Tapias","Caño Limón - Coveñas","Occidental & Ecopetrol","Oil Spill","7th Special Forces","Fuerza Aérea Colombiana","High Mountain Battalions","Blackhawks","National Defense & Security Council","Plan Colombia","Plan Meteoro","Tres Esquinas","War Tax","Coffee Prices","Madrid Donors","NSPD-18","General Offensive","Mono Jojoy","Raúl Reyes","Alfonso Cano","DoD Contractors","Operación Jaque","Ejército de Liberación Nacional","Gramaje","Misil Antiaéreo","Hugo Chávez","Kill Zone","Peace Commission","Betancourt","Secuestrados","Sucumbíos","Airdropped AKs","Crop Substitution","Zona de Convivencia","Former Military","National Coordination Center","Soldados Campesinos","Demobilization","Mancuso","Senado & Cámara","Calima Front","Colombia Nueva","Los Derechos Humanos","Limpieza","Pinto & del Rosario","Unión Sindical Obrera","Bloques","Carabineros","Pipeline Repairs","Castaño","Criminal Air Force","Deserters & Defectors","DEA Agents","Drogas La Rebaja","Op Millennium","General Serrano","Salcedo","The Chess Player","Air Bridge","Amazonía","Narco-War","Cocaine Labs","Poppies","Tingo María","Mexican Traffickers","Narco-Subs","Riverines & Fast Boats","Ayahuasca Tourism","Darién","Sicarios","Propaganda!","Propaganda!","Propaganda!","Propaganda!"],"card_flavor":[null,"Jointness","COIN experts take charge","CO tightens civil-military bonds","Profitable pipeline","Oil company security","Rebels blamed","Infrastructure protection training","COIN strike aircraft","Elites guard high-altitude corridors","US helos delivered","Military-police jointness","US \"War on Drugs\"","Transport protection units","Forward base","Defense budget shot in the arm","They're up","Aid conference generous","US \"War on Terror\" takes on FARC",null,"KIA puts FARC in disarray","FARC Deputy killed","FARC leader killed in military strike","US provides aircrew","Dramatic hostage rescue","ELN and FARC jockey","FARC protection rejected","FARC MANPADs deemed a myth","Caracas controls border","Army sniffs out FARC trap","FARC accused in Commissioner's killing","Sympathy for famous hostage","Fed up with hostage-taking","Ecuadoran buffer zone","Insurgents scammed by Russian criminals","Government initiative","ELN gets its DMZ","Ties that bind","New command fights paramilitaries","Local forces platoons","Negotiated reintegration","AUC No.2 extradited","Unity behind Presidential war policy","Suspect leftists massacred","Anti-corruption campaign","Officers disciplined","Ruthless elimination","Human rights investigators","AUC targets oil labor organizers","Militias defy Castaño","National police field forces","Speedy patching","AUC leader's memoir a best seller","Insurgent access to small aircraft",null,"Law enforcement assistance","Cali cartel's drugstore chain seized","Colombian-US strike at Bernal syndicate","National Police hammer cartels","Cartel informant","Kingpin strategy scores","Peruvian coca supply controlled","Brasília's Op Cobra blocks border","Rival syndicates go for the throat","FARC taps suppliers","Growers and Government eradication focus on heroin source","Coca crop fails","Major shipment busted en route","Submersibles seized",null,"Eco-tourism helps trade balance","Arms traffic interdicted","Hired drug guns unreliable"],"card_flavor_shaded":[null,"Service parochialism","COIN strategy eludes Army","Civil-military rivalries fester","Pipeline draws attacks","Industry thought exploitative","Multinationals make mess","US training ineffective","Budget diverted to expensive jets","Equipment not delivered","Delivery of US helos delayed","Military-police rivalry","US aid focuses on drug war","Transport security deemphasized","Base overrun","Middle class resents cost of war","They're down","EU aid focuses on reconstruction","US focused on Mid-East and South Asia",null,"Military strategist","FARC Deputy channels foreign support","Ideologue","Plane down - hostage search and evasion","Hostage rescue goes awry","ELN and FARC coordinate ops","Schedule of fees","MANPADs feared","Caracas aids rebels","Tactics lure enemy in","Peace bid","Hostage negotiations forum for FARC","Ransoming highly profitable","Cross-border war","Covert weapons delivery","FARC proposals lauded",null,"Ex-officers advise paramilitaries","Sympathizers alert AUC","Local forces augment autodefensas","Talks a ruse, fighters recycled","AUC drug lord","Insurgent sympathies","Brutality blamed on Army","Political campaign divisive","International human rights cartel",null,"Prosecutors killed","Labor backs FARC","Independent militias join AUC","National police corruption","Security concerns hinder maintenance","Charismatic AUC political leader",null,null,"Más Yanquis","Retail empire","Investigation penetrated","Officials on cartel payroll","Cali cartel security chief","Cali's Gilberto Rodríguez Orejuela expands empire","Colombian coca growers fill Peruvian void","Jungle landing strips",null,"Well-oiled industry",null,"Hearty coca variety","New routes to US market","Littoral stealth",null,"Eco-tourists taken","Border sanctuary","Unemployed ready to work for syndicates"],"card_unshaded_lines":[0,3,2,3,3,3,3,3,2,2,2,2,3,3,3,3,4,3,3,0,3,3,3,3,3,2,3,3,3,3,4,3,4,3,3,3,0,4,4,2,3,3,3,4,4,3,0,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,0,4,0,3,2,3,0,3,3,3],"card_shaded_lines":[0,3,3,3,3,4,4,3,2,3,4,3,4,3,3,3,2,4,4,0,4,4,4,4,4,4,4,4,4,4,3,3,2,4,4,4,0,4,3,3,4,3,4,3,3,4,0,4,4,3,4,4,4,0,0,4,4,4,3,4,4,4,3,0,3,0,4,4,3,0,4,4,4],"space_name":["Bogotá","Cali","Medellín","Bucaramanga","Ibagué","Santa Marta","Cartagena","Cúcuta","Neiva","Pasto","Sincelejo","Atlántico","Chocó","Nariño","Meta West","Guaviare","Putumayo","Cesar","Antioquia","Santander","Huila","Arauca","Meta East","Vichada","Guainía","Vaupés","Amazonas","Ecuador","Panamá","Cartagena-Santa Marta LoC","Cali-Pasto LoC","Neiva-Pasto LoC","Bogotá-San José LoC","Pasto-Tumaco LoC","Buenaventura-Cali LoC","Cartagena-Sincelejo LoC","Medellín-Sincelejo LoC","Ibagué-Medellín LoC","Cali-Ibagué LoC","Bogotá-Bucaramanga-Ibagué LoC","Bogotá-Neiva LoC","Arauca-Cúcuta LoC","Bogotá-Yopal LoC","Ayacucho-Santa Marta LoC","Ayacucho-Bucaramanga LoC","Ayacucho-Sincelejo LoC","Ayacucho-Cúcuta LoC"],"spaces":[{"type":"city","id":"Bogota","pop":8,"adjacent":[14,19,20,22,32,39,40,42]},{"type":"city","id":"Cali","pop":3,"adjacent":[12,13,20,30,34,38]},{"type":"city","id":"Medellin","pop":3,"adjacent":[12,18,36,37]},{"type":"city","id":"Bucaramanga","pop":2,"adjacent":[18,19,39,44]},{"type":"city","id":"Ibague","pop":2,"adjacent":[12,18,20,37,38,39]},{"type":"city","id":"Santa Marta","pop":2,"adjacent":[11,17,29,43]},{"type":"city","id":"Cartagena","pop":1,"adjacent":[11,29,35]},{"type":"city","id":"Cucuta","pop":1,"adjacent":[19,41,46]},{"type":"city","id":"Neiva","pop":1,"adjacent":[14,16,20,31,40]},{"type":"city","id":"Pasto","pop":1,"adjacent":[13,16,20,27,30,31,33]},{"type":"city","id":"Sincelejo","pop":1,"adjacent":[11,12,18,35,36,45]},{"type":"forest","id":"Atlantico","pop":1,"adjacent":[5,6,10,17,18,19,29,35,43,44,45,46]},{"type":"forest","id":"Choco","pop":1,"adjacent":[1,2,4,10,13,18,20,28,34,36,37,38]},{"type":"forest","id":"Narino","pop":1,"adjacent":[1,9,12,20,27,30,33,34]},{"type":"forest","id":"Meta West","pop":1,"adjacent":[0,8,15,16,20,22,32,40]},{"type":"forest","id":"Guaviare","pop":1,"adjacent":[14,16,22,23,24,25,32]},{"type":"forest","id":"Putumayo","pop":1,"adjacent":[8,9,14,15,20,25,26,27,31]},{"type":"mountain","id":"Cesar","pop":1,"adjacent":[5,11,18,19,43,44,45,46]},{"type":"mountain","id":"Antioquia","pop":2,"adjacent":[2,3,4,10,11,12,17,19,20,36,37,39,43,44,45,46]},{"type":"mountain","id":"Santander","pop":2,"adjacent":[0,3,7,11,17,18,20,21,22,39,41,42,43,44,45,46]},{"type":"mountain","id":"Huila","pop":2,"adjacent":[0,1,4,8,9,12,13,14,16,18,19,30,31,38,39,40]},{"type":"grassland","id":"Arauca","pop":1,"adjacent":[19,22,23,41,42]},{"type":"grassland","id":"Meta East","pop":1,"adjacent":[0,14,15,19,21,23,32,42]},{"type":"grassland","id":"Vichada","pop":0,"adjacent":[15,21,22,24]},{"type":"forest","id":"Guainia","pop":0,"adjacent":[15,23,25]},{"type":"forest","id":"Vaupes","pop":0,"adjacent":[15,16,24,26]},{"type":"forest","id":"Amazonas","pop":0,"adjacent":[16,25]},{"type":"grassland","id":"Ecuador","pop":0,"adjacent":[9,13,16,33]},{"type":"forest","id":"Panama","pop":0,"adjacent":[12]},{"type":"road","id":"Cartagena-Santa Marta LoC","econ":1,"adjacent":[5,6,11]},{"type":"road","id":"Cali-Pasto LoC","econ":1,"adjacent":[1,9,13,20]},{"type":"road","id":"Neiva-Pasto LoC","econ":1,"adjacent":[8,9,16,20]},{"type":"road","id":"Bogota-San Jose LoC","econ":1,"adjacent":[0,14,15,22]},{"type":"road","id":"Pasto-Tumaco LoC","econ":1,"adjacent":[9,13,27]},{"type":"pipeline","id":"Buenaventura-Cali LoC","econ":1,"adjacent":[1,12,13]},{"type":"pipeline","id":"Cartagena-Sincelejo LoC","econ":1,"adjacent":[6,10,11]},{"type":"pipeline","id":"Medellin-Sincelejo LoC","econ":2,"adjacent":[2,10,12,18]},{"type":"pipeline","id":"Ibague-Medellin LoC","econ":1,"adjacent":[2,4,12,18]},{"type":"pipeline","id":"Cali-Ibague LoC","econ":1,"adjacent":[1,4,12,20]},{"type":"pipeline","id":"Bogota-Bucaramanga-Ibague LoC","econ":2,"adjacent":[0,3,4,18,19,20]},{"type":"pipeline","id":"Bogota-Neiva LoC","econ":2,"adjacent":[0,8,14,20]},{"type":"pipeline","id":"Arauca-Cucuta LoC","econ":3,"adjacent":[7,19,21,21]},{"type":"pipeline","id":"Bogota-Yopal LoC","econ":2,"adjacent":[0,19,21,22]},{"type":"pipeline","id":"Ayacucho-Santa Marta LoC","econ":2,"adjacent":[5,11,17,18,19,44,45,46]},{"type":"pipeline","id":"Ayacucho-Bucaramanga LoC","econ":2,"adjacent":[3,11,17,18,19,43,45,46]},{"type":"pipeline","id":"Ayacucho-Sincelejo LoC","econ":3,"adjacent":[10,11,17,18,19,43,44,46]},{"type":"pipeline","id":"Ayacucho-Cucuta LoC","econ":3,"adjacent":[7,11,17,18,19,43,44,45]}],"adjacent_patrol":[[32,39,40,42],[30,34,38],[36,37],[39,44],[37,38,39],[29,43],[29,35],[41,46],[31,40],[30,31,33],[35,36,45],[5,6,10,29,35,43,44,45,46],[1,2,4,10,34,36,37,38],[1,9,30,33,34],[0,8,32,40],[32],[8,9,31],[5,43,44,45,46],[2,3,4,10,36,37,39,43,44,45,46],[0,3,7,39,41,42,43,44,45,46],[0,1,4,8,9,30,31,38,39,40],[41,42],[0,32,42],[],[],[],[],[9,33],[],[5,6],[1,9],[8,9],[0],[9],[1],[6,10],[2,10],[2,4],[1,4],[0,3,4],[0,8],[7],[0],[5,44,45,46],[3,43,45,46],[10,43,44,46],[7,43,44,45]],"first_piece":[[0,3,3,33,0],[63,72],[102,108],[126,141]],"last_piece":[[2,2,32,62,-1],[71,101],[107,125],[140,152]]} if (typeof module !== 'undefined') module.exports = data @@ -34,24 +34,24 @@ const LAYOUT = { "Meta West": [720, 1539], "Guaviare": [976, 1669], "Putumayo": [680, 1826], - "Sincelejo / Ayacucho": [642, 696], - "Cucuta / Arauca": [994, 977], - "Bucaramanga / Ibague / Bogota": [626, 1224], - "Bogota / Yopal": [887, 1276], - "Bogota / Neiva": [612, 1414], - "Bogota / San Jose": [826, 1474], - "Neiva / Pasto": [530, 1698], - "Pasto / Tumaco": [146, 1766], - "Cali / Pasto": [348, 1625], - "Cali / Buenaventura": [368, 1412], - "Ibague / Cali": [436, 1362], - "Medellin / Ibague": [511, 1169], - "Cartagena / Sincelejo": [514, 613], - "Sincelejo / Medellin": [563, 876], - "Bucaramanga / Ayacucho": [778, 830], - "Cucuta / Ayacucho": [872, 708], - "Santa Marta / Ayacucho": [746, 601], - "Santa Marta / Cartagena": [588, 466], + "Ayacucho-Sincelejo LoC": [642, 696], + "Arauca-Cucuta LoC": [994, 977], + "Bogota-Bucaramanga-Ibague LoC": [626, 1224], + "Bogota-Yopal LoC": [887, 1276], + "Bogota-Neiva LoC": [612, 1414], + "Bogota-San Jose LoC": [826, 1474], + "Neiva-Pasto LoC": [530, 1698], + "Pasto-Tumaco LoC": [146, 1766], + "Cali-Pasto LoC": [348, 1625], + "Buenaventura-Cali LoC": [368, 1412], + "Cali-Ibague LoC": [436, 1362], + "Ibague-Medellin LoC": [511, 1169], + "Cartagena-Sincelejo LoC": [514, 613], + "Medellin-Sincelejo LoC": [563, 876], + "Ayacucho-Bucaramanga LoC": [778, 830], + "Ayacucho-Cucuta LoC": [872, 708], + "Ayacucho-Santa Marta LoC": [746, 601], + "Cartagena-Santa Marta LoC": [588, 466], "Atlantico Govt": [619, 504], "Atlantico AUC": [580, 603], "Atlantico Cartels": [634, 548], @@ -142,42 +142,42 @@ const LAYOUT = { "Panama Cartels": [135, 709], "Panama FARC": [222, 754], "Panama DRUGS": [201, 907], - "Sincelejo / Ayacucho COIN": [700, 731], - "Sincelejo / Ayacucho INSURGENTS": [614, 676], - "Bucaramanga / Ayacucho COIN": [771, 779], - "Bucaramanga / Ayacucho INSURGENTS": [782, 875], - "Cucuta / Ayacucho COIN": [829, 740], - "Cucuta / Ayacucho INSURGENTS": [899, 736], - "Santa Marta / Ayacucho COIN": [766, 643], - "Santa Marta / Ayacucho INSURGENTS": [716, 564], - "Bogota / Yopal COIN": [853, 1309], - "Bogota / Yopal INSURGENTS": [912, 1231], - "Bogota / Neiva COIN": [655, 1413], - "Bogota / Neiva INSURGENTS": [600, 1458], - "Bogota / San Jose COIN": [784, 1447], - "Bogota / San Jose INSURGENTS": [871, 1495], - "Bucaramanga / Ibague / Bogota COIN": [659, 1256], - "Bucaramanga / Ibague / Bogota INSURGENTS": [640, 1166], - "Cucuta / Arauca COIN": [951, 947], - "Cucuta / Arauca INSURGENTS": [1053, 985], - "Neiva / Pasto COIN": [545, 1652], - "Neiva / Pasto INSURGENTS": [492, 1735], - "Pasto / Tumaco COIN": [182, 1789], - "Pasto / Tumaco INSURGENTS": [110, 1744], - "Cali / Pasto COIN": [312, 1650], - "Cali / Pasto INSURGENTS": [373, 1595], - "Cali / Buenaventura COIN": [343, 1400], - "Cali / Buenaventura INSURGENTS": [304, 1394], - "Ibague / Cali COIN": [424, 1407], - "Ibague / Cali INSURGENTS": [452, 1340], - "Medellin / Ibague COIN": [508, 1193], - "Medellin / Ibague INSURGENTS": [512, 1142], - "Cartagena / Sincelejo COIN": [522, 643], - "Cartagena / Sincelejo INSURGENTS": [529, 579], - "Sincelejo / Medellin COIN": [550, 931], - "Sincelejo / Medellin INSURGENTS": [541, 831], - "Santa Marta / Cartagena COIN": [563, 469], - "Santa Marta / Cartagena INSURGENTS": [608, 441], + "Ayacucho-Sincelejo LoC COIN": [700, 731], + "Ayacucho-Sincelejo LoC INSURGENTS": [614, 676], + "Ayacucho-Bucaramanga LoC COIN": [771, 779], + "Ayacucho-Bucaramanga LoC INSURGENTS": [782, 875], + "Ayacucho-Cucuta LoC COIN": [829, 740], + "Ayacucho-Cucuta LoC INSURGENTS": [899, 736], + "Ayacucho-Santa Marta LoC COIN": [766, 643], + "Ayacucho-Santa Marta LoC INSURGENTS": [716, 564], + "Bogota-Yopal LoC COIN": [853, 1309], + "Bogota-Yopal LoC INSURGENTS": [912, 1231], + "Bogota-Neiva LoC COIN": [655, 1413], + "Bogota-Neiva LoC INSURGENTS": [600, 1458], + "Bogota-San Jose LoC COIN": [784, 1447], + "Bogota-San Jose LoC INSURGENTS": [871, 1495], + "Bogota-Bucaramanga-Ibague LoC COIN": [659, 1256], + "Bogota-Bucaramanga-Ibague LoC INSURGENTS": [640, 1166], + "Arauca-Cucuta LoC COIN": [951, 947], + "Arauca-Cucuta LoC INSURGENTS": [1053, 985], + "Neiva-Pasto LoC COIN": [545, 1652], + "Neiva-Pasto LoC INSURGENTS": [492, 1735], + "Pasto-Tumaco LoC COIN": [182, 1789], + "Pasto-Tumaco LoC INSURGENTS": [110, 1744], + "Cali-Pasto LoC COIN": [312, 1650], + "Cali-Pasto LoC INSURGENTS": [373, 1595], + "Buenaventura-Cali LoC COIN": [343, 1400], + "Buenaventura-Cali LoC INSURGENTS": [304, 1394], + "Cali-Ibague LoC COIN": [424, 1407], + "Cali-Ibague LoC INSURGENTS": [452, 1340], + "Ibague-Medellin LoC COIN": [508, 1193], + "Ibague-Medellin LoC INSURGENTS": [512, 1142], + "Cartagena-Sincelejo LoC COIN": [522, 643], + "Cartagena-Sincelejo LoC INSURGENTS": [529, 579], + "Medellin-Sincelejo LoC COIN": [550, 931], + "Medellin-Sincelejo LoC INSURGENTS": [541, 831], + "Cartagena-Santa Marta LoC COIN": [563, 469], + "Cartagena-Santa Marta LoC INSURGENTS": [608, 441], } // END LAYOUT DATA @@ -195,12 +195,12 @@ const ECUADOR = 27 const PANAMA = 28 // LoCs -const CUCUTA_AYACUCHO = data.space_name.indexOf("Cúcuta / Ayacucho") -const CUCUTA_ARAUCA = data.space_name.indexOf("Cúcuta / Arauca") -const PASTO_TUMACO = data.space_name.indexOf("Pasto / Tumaco") -const CALI_BUENAVENTURA = data.space_name.indexOf("Cali / Buenaventura") -const CARTAGENA_SINCELEJO = data.space_name.indexOf("Cartagena / Sincelejo") -const SANTA_MARTA_CARTAGENA = data.space_name.indexOf("Santa Marta / Cartagena") +const AYACUCHO_CUCUTA_LOC = data.space_name.indexOf("Ayacucho-Cúcuta LoC") +const ARAUCA_CUCUTA_LOC = data.space_name.indexOf("Arauco-Cúcuta LoC") +const PASTO_TUMACO_LOC = data.space_name.indexOf("Pasto-Tumaco LoC") +const BEUNAVENTURA_CALI_LOC = data.space_name.indexOf("Buenaventura-Cali LoC") +const CARTAGENA_SINCELEJO_LOC = data.space_name.indexOf("Cartagena-Sincelejo LoC") +const CARTAGENA_SANTA_MARTA_LOC = data.space_name.indexOf("Cartagena-Santa Marta LoC") exports.roles = function (scenario) { if (scenario.startsWith("2P")) @@ -952,10 +952,10 @@ function is_coastal_space(s) { s === NARINO || s === PANAMA || s === ECUADOR || - s === PASTO_TUMACO || - s === CALI_BUENAVENTURA || - s === CARTAGENA_SINCELEJO || - s === SANTA_MARTA_CARTAGENA + s === PASTO_TUMACO_LOC || + s === BEUNAVENTURA_CALI_LOC || + s === CARTAGENA_SINCELEJO_LOC || + s === CARTAGENA_SANTA_MARTA_LOC ) } @@ -965,7 +965,7 @@ function is_next_to_ecuador(s) { s === PASTO || s === PUTUMAYO || s === ARAUCA || - s === PASTO_TUMACO + s === PASTO_TUMACO_LOC ) } @@ -977,8 +977,8 @@ function is_next_to_venezuela(s) { s === ARAUCA || s === VICHADA || s === GUAINIA || - s === CUCUTA_AYACUCHO || - s === CUCUTA_ARAUCA + s === AYACUCHO_CUCUTA_LOC || + s === ARAUCA_CUCUTA_LOC ) } diff --git a/tools/gendata.js b/tools/gendata.js index 93a72d5..d6efbc5 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -385,8 +385,8 @@ function def_town(name) { } function def_loc(type, econ, cities, depts) { - let name = cities.join(" / ") - let loc_names = cities.concat(depts) + let name = cities.slice().sort().join("-") + " LoC" + let loc_names = cities.concat(depts).sort() for (let n of loc_names) if (space_name.indexOf(n) < 0) console.log("not a space: " + n) diff --git a/tools/genlayout.py b/tools/genlayout.py index b113e8e..033ef5e 100644 --- a/tools/genlayout.py +++ b/tools/genlayout.py @@ -34,7 +34,17 @@ def readsvg(filename): if line.startswith('height="'): h = round(float(line.split('"')[1])) if line.startswith('cx="'): x = round(float(line.split('"')[1])) if line.startswith('cy="'): y = round(float(line.split('"')[1])) - if line.startswith('inkscape:label="'): name = line.split('"')[1] + if line.startswith('inkscape:label="'): + name = line.split('"')[1] + if " / " in name: + if " COIN" in name: + name = name.replace(" COIN", "") + name = "-".join(sorted(name.split(" / "))) + " LoC COIN" + elif " INSURGENTS" in name: + name = name.replace(" INSURGENTS", "") + name = "-".join(sorted(name.split(" / "))) + " LoC INSURGENTS" + else: + name = "-".join(sorted(name.split(" / "))) + " LoC" flush() readsvg("tools/boxes.svg") |