From 575704624d3e5bd5b6acc755e7c83e966803057c Mon Sep 17 00:00:00 2001 From: Eric Tillberg Date: Sat, 14 Oct 2023 13:12:11 -0400 Subject: [PATCH] Improve map saturation and readability --- app/javascript/src/components/Board.vue | 3 +- app/javascript/src/components/Province.vue | 63 +++++++++++++++++++- app/javascript/src/components/flags/Flag.vue | 10 ---- cypress/e2e/standard_game.cy.js | 6 +- 4 files changed, 65 insertions(+), 17 deletions(-) diff --git a/app/javascript/src/components/Board.vue b/app/javascript/src/components/Board.vue index 4daf1642..16d963c5 100644 --- a/app/javascript/src/components/Board.vue +++ b/app/javascript/src/components/Board.vue @@ -136,12 +136,11 @@ export default { onForeignLand = true; } } - const friendly = provinceUnits.friendly && onForeignLand; let armyNation = nation; if (armyNation === 'CN' && this.game.baseGame === 'imperialAsia') { armyNation = 'CNAsia'; } - armies.push({ nation: armyNation, friendly }); + armies.push({ nation: armyNation, friendly: provinceUnits.friendly, onForeignLand }); } } } diff --git a/app/javascript/src/components/Province.vue b/app/javascript/src/components/Province.vue index 1d30979a..c4c3ceff 100644 --- a/app/javascript/src/components/Province.vue +++ b/app/javascript/src/components/Province.vue @@ -5,7 +5,10 @@ @mouseover="showFactory()" @mouseleave="hideFactory()" > - + + + + + diff --git a/app/javascript/src/components/flags/Flag.vue b/app/javascript/src/components/flags/Flag.vue index 8b0e5751..e2086980 100644 --- a/app/javascript/src/components/flags/Flag.vue +++ b/app/javascript/src/components/flags/Flag.vue @@ -10,15 +10,6 @@ :fleet="fleet" :filter="activeFilter" /> - @@ -32,7 +23,6 @@ export default { fleet: Boolean, height: { type: String, default: '' }, nation: { type: String, default: '' }, - friendly: Boolean, transform: { type: String, default: '' }, width: { type: String, default: '' }, x: { type: Number, default: 0 }, diff --git a/cypress/e2e/standard_game.cy.js b/cypress/e2e/standard_game.cy.js index 6d6ceef3..ba2781ce 100644 --- a/cypress/e2e/standard_game.cy.js +++ b/cypress/e2e/standard_game.cy.js @@ -172,10 +172,10 @@ describe('Standard game', () => { cy.contains('Berlin').next().click(); cy.contains('Munich').next().click(); cy.contains('Fight').click(); - cy.contains('Holland').click(); - cy.contains('Belgium').click(); + cy.contains('Holland').click({ force: true }); + cy.contains('Belgium').click({ force: true }); cy.contains('Fight').click(); - cy.contains('Denmark').click(); + cy.contains('Denmark').click({ force: true }); cy.contains('Sweden').click(); // RU cy.get('#investor').click();