Integrate Offshore bank into SVG board and migrate viewer to Vite
This commit is contained in:
parent
a7064f9c53
commit
b042edaaa5
39 changed files with 4207 additions and 14410 deletions
14
.github/workflows/viewer-publish.yml
vendored
14
.github/workflows/viewer-publish.yml
vendored
|
|
@ -29,19 +29,13 @@ jobs:
|
|||
# registry-url is required so npm publish targets the public npm registry
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: npm install -g pnpm@11
|
||||
- run: pnpm install
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: git config --global user.name github-actions
|
||||
- run: git config --global user.email bot@github.com
|
||||
- run: yarn config set version-git-message "Viewer v%s"
|
||||
- run: yarn version --${{ github.event.inputs.newversion }}
|
||||
- run: sed -i 's:"container-viewer":"@boardgamers/container-viewer":' package.json
|
||||
# pnpm 10.16+ supports OIDC trusted publishing and rewrites the workspace:../engine
|
||||
# dependency to a real version range; publish via npx so we don't have to bump the
|
||||
# repo-wide pnpm (which would force a lockfile rewrite). No NODE_AUTH_TOKEN is set, so
|
||||
# publishing authenticates with the OIDC token instead of the (now-rejected) npm token.
|
||||
# NODE_OPTIONS=--openssl-legacy-provider works around webpack 4 (vue-cli-service) relying
|
||||
# on MD4, which OpenSSL 3 (bundled with Node >= 17) no longer supports out of the box.
|
||||
- run: npx -y pnpm@latest publish . --access public --no-git-checks
|
||||
env:
|
||||
NODE_OPTIONS: --openssl-legacy-provider
|
||||
# pnpm supports OIDC trusted publishing and rewrites workspace dependencies.
|
||||
# No NODE_AUTH_TOKEN: publishing authenticates with the OIDC token.
|
||||
- run: pnpm publish . --access public --no-git-checks
|
||||
- run: git push --follow-tags
|
||||
|
|
|
|||
16
.github/workflows/viewer-test.yml
vendored
16
.github/workflows/viewer-test.yml
vendored
|
|
@ -4,12 +4,18 @@ on:
|
|||
paths:
|
||||
- '.github/workflows/viewer-test.yml'
|
||||
- 'viewer/**'
|
||||
- 'engine/**'
|
||||
- 'pnpm-lock.yaml'
|
||||
- 'pnpm-workspace.yaml'
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/viewer-test.yml'
|
||||
- 'viewer/**'
|
||||
- 'engine/**'
|
||||
- 'pnpm-lock.yaml'
|
||||
- 'pnpm-workspace.yaml'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
|
@ -18,8 +24,6 @@ defaults:
|
|||
jobs:
|
||||
test_and_build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NODE_OPTIONS: --openssl-legacy-provider
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
|
|
@ -28,12 +32,14 @@ jobs:
|
|||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 11
|
||||
- run: pnpm install
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm --dir .. test:locales
|
||||
# - run: pnpm lint
|
||||
# - run: pnpm test
|
||||
- run: pnpm check
|
||||
- run: pnpm test:unit
|
||||
- run: pnpm test:tutorial
|
||||
- run: pnpm build
|
||||
- run: pnpm --dir ../engine build
|
||||
- run: pnpm package
|
||||
- run: pnpm exec playwright install --with-deps chromium
|
||||
- run: pnpm test:browser
|
||||
- run: pnpm test:offshore:browser
|
||||
|
|
|
|||
|
|
@ -66,6 +66,18 @@ The old 10th Anniversary Investment Bank differs from the requested newer
|
|||
Off-Shore Bank (for example its single auction and subsidy wording). It is not
|
||||
used to override the newer bank rules.
|
||||
|
||||
## Viewer
|
||||
|
||||
The bank is part of the SVG board, using the same cargo pieces, outlined spaces,
|
||||
player colors, buttons and bid calculator as the base game. The Offshore board
|
||||
adds a lower bank area without shifting the classic board coordinates. On mobile,
|
||||
the **Bank** navigation button brings that area into view.
|
||||
|
||||
Click a lot to offer cash or select stored cargo, then confirm the offer. Required
|
||||
repricing, default and payment choices appear beside the lots; holdings can be
|
||||
clicked to load on arrival. Large cargo lots and decision lists are paginated.
|
||||
There is no separate expansion banner or collapsible card panel.
|
||||
|
||||
## Developer testing
|
||||
|
||||
Run the existing local viewer with `pnpm --dir viewer serve`, then add
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
export { availableMoves, AvailableMoves } from './src/available-moves';
|
||||
export { availableMoves } from './src/available-moves';
|
||||
export type { AvailableMoves } from './src/available-moves';
|
||||
export * from './src/choice-revisions';
|
||||
export { currentPlayers, ended, move, moveAI, setup, stripSecret } from './src/engine';
|
||||
export { Phase, ShipPosition } from './src/gamestate';
|
||||
|
|
@ -12,5 +13,7 @@ export type {
|
|||
Player,
|
||||
PointCard,
|
||||
} from './src/gamestate';
|
||||
export { GameEventName, LogItem } from './src/log';
|
||||
export { isLoanReversal, Move, MoveName, Moves } from './src/move';
|
||||
export { GameEventName } from './src/log';
|
||||
export type { LogItem } from './src/log';
|
||||
export { isLoanReversal, MoveName } from './src/move';
|
||||
export type { Move, Moves } from './src/move';
|
||||
|
|
|
|||
13708
pnpm-lock.yaml
generated
13708
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,10 +1,10 @@
|
|||
packages:
|
||||
- 'viewer'
|
||||
- 'engine'
|
||||
# Dependency build scripts are not needed: everything installs and builds with them
|
||||
# skipped (core-js/ejs postinstalls are ads, @parcel/watcher ships prebuilds, yorkie
|
||||
# is superseded by husky). Explicit so pnpm doesn't error on unreviewed builds.
|
||||
# esbuild installs and validates the platform binary used by Vite. Other listed
|
||||
# dependency lifecycle scripts are unnecessary for this workspace.
|
||||
allowBuilds:
|
||||
esbuild: true
|
||||
'@parcel/watcher': false
|
||||
core-js: false
|
||||
ejs: false
|
||||
|
|
@ -12,19 +12,8 @@ allowBuilds:
|
|||
nodent-runtime: false
|
||||
yorkie: false
|
||||
|
||||
# vue2 project: without this, pnpm auto-installs @vue/cli's optional @vue/compiler-sfc
|
||||
# (vue 3) peer and the cli-plugin-typescript shim crashes the viewer build (CI-only,
|
||||
# fresh installs). vue-template-compiler is the correct vue2 path.
|
||||
# Keep peer dependencies explicit and frozen installs reproducible.
|
||||
autoInstallPeers: false
|
||||
|
||||
minimumReleaseAgeExclude:
|
||||
- '@boardgamers/protocol@0.2.2 || 0.3.0 || 0.3.1 || 0.3.3 || 0.4.0 || 0.4.2 || 0.5.0 || 0.6.0 || 0.6.1 || 0.6.2 || 0.8.1 || 0.10.0 || 0.11.0'
|
||||
# The cli-plugin-typescript fork-ts-checker shim does a bare
|
||||
# require('@vue/compiler-sfc') expecting the vue-3 parse shape ({descriptor}).
|
||||
# It declares no such dependency, so resolution falls back to pnpm's hidden
|
||||
# hoist, where EITHER 3.5.41 (works) or vue 2.7's 2.7.16 (legacy shape,
|
||||
# crashes the build) may win depending on layout. Pin it explicitly.
|
||||
packageExtensions:
|
||||
'@vue/cli-plugin-typescript':
|
||||
dependencies:
|
||||
'@vue/compiler-sfc': ^3.5.41
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Container viewer
|
||||
|
||||
From the repository root, install with `pnpm install`.
|
||||
Use Node.js 24 and pnpm 11. From the repository root, install with
|
||||
`pnpm install --frozen-lockfile`. The workspace explicitly permits esbuild's
|
||||
required platform-binary installation script.
|
||||
|
||||
## Local development
|
||||
|
||||
|
|
@ -18,7 +20,9 @@ Add `?chapter=supply-chain` to open a tutorial. The other chapter IDs are
|
|||
```sh
|
||||
pnpm --dir viewer check
|
||||
pnpm --dir viewer test:tutorial
|
||||
NODE_OPTIONS=--openssl-legacy-provider pnpm --dir viewer package
|
||||
pnpm --dir viewer test:unit
|
||||
pnpm --dir viewer build
|
||||
pnpm --dir viewer package
|
||||
pnpm --dir viewer test:browser
|
||||
pnpm --dir viewer test:offshore:browser
|
||||
pnpm --dir viewer test:tutorial:browser
|
||||
|
|
@ -31,9 +35,26 @@ viewer on port 5197.
|
|||
The Vue 2 type checker needs `zod` available directly in this workspace to resolve
|
||||
the protocol's schema types through pnpm's symlinks. It is a development dependency.
|
||||
|
||||
## Package compatibility
|
||||
|
||||
The Vue 2 viewer uses Vite for development and builds; no OpenSSL legacy
|
||||
provider or Vue CLI setup is needed. `build` produces the standalone demo,
|
||||
while `package` produces the classic-script UMD viewer for BGS.
|
||||
|
||||
Load Vue 2 before `dist/container-viewer.umd.min.js` and include
|
||||
`dist/container-viewer.css` separately; the bundle does not inject CSS. The
|
||||
existing `container.launch` and `container.launchTutorial` globals are retained.
|
||||
Deploy the matching `container-viewer.umd.min.locale-*.js` sidecars beside the
|
||||
minified entry, keeping their filenames: non-English translations are loaded
|
||||
lazily as native ES modules relative to that script URL. Serve them with a
|
||||
JavaScript MIME type and allow CORS when hosting assets on another origin.
|
||||
English is bundled. The readable `container-viewer.umd.js` build uses its own
|
||||
`container-viewer.umd.locale-*.js` sidecars. Publish/deploy JS, CSS and matching
|
||||
sidecars together (do not upload only the entry bundle).
|
||||
|
||||
## Tutorials on BGS
|
||||
|
||||
Upload the same JS and CSS as the ordinary viewer. The `container` global exposes
|
||||
Upload the same JS, CSS and locale sidecars as the ordinary viewer. The `container` global exposes
|
||||
both `launch` and `launchTutorial`. Chapter metadata is exported as `chapterCards`
|
||||
from `src/tutorial/lessons.ts`; enter these IDs, versions, titles and descriptions
|
||||
in the BGS version's Tutorial settings.
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
module.exports = {
|
||||
presets: [['@vue/cli-plugin-babel/preset', { forceAllTransforms: true }]],
|
||||
plugins: ['@babel/plugin-transform-export-namespace-from'],
|
||||
};
|
||||
19
viewer/index.html
Normal file
19
viewer/index.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
<title>Container</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>Container needs JavaScript enabled to run. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<script type="module">
|
||||
import process from 'process/browser';
|
||||
globalThis.process = process;
|
||||
import('/src/main.ts');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -7,10 +7,10 @@
|
|||
"directory": "viewer"
|
||||
},
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"test:unit": "vue-cli-service test:unit",
|
||||
"package": "vue-cli-service build --target lib --name container-viewer src/wrapper.ts",
|
||||
"serve": "vite --host 0.0.0.0",
|
||||
"build": "vite build",
|
||||
"test:unit": "vitest run",
|
||||
"package": "vite build --mode library && vite build --mode library-readable",
|
||||
"prepublishOnly": "npm run package",
|
||||
"test:browser": "node scripts/protocol-smoke.mjs",
|
||||
"test:offshore:browser": "node scripts/offshore-smoke.mjs",
|
||||
|
|
@ -21,39 +21,40 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@boardgamers/protocol": "0.11.0",
|
||||
"assert": "^2.1.0",
|
||||
"container-engine": "workspace:../engine",
|
||||
"core-js": "^3.6.5",
|
||||
"events": "^3.3.0",
|
||||
"lodash": "^4.17.19",
|
||||
"process": "^0.11.10",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"tslib": "^2.2.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue": "2.7.16",
|
||||
"vue-class-component": "^7.2.3",
|
||||
"vue-property-decorator": "^9.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-export-namespace-from": "7.29.7",
|
||||
"@rollup/plugin-inject": "^5.0.5",
|
||||
"@types/assert": "^1.4.7",
|
||||
"@types/chai": "^4.2.11",
|
||||
"@types/events": "^3.0.0",
|
||||
"@types/lodash": "^4.14.154",
|
||||
"@types/mocha": "^5.2.4",
|
||||
"@types/node": "^13.13.52",
|
||||
"@types/webpack-env": "^1.18.8",
|
||||
"@types/node": "^24.0.0",
|
||||
"@typescript-eslint/parser": "^4.26.1",
|
||||
"@vue/cli-plugin-babel": "~4.4.0",
|
||||
"@vue/cli-plugin-typescript": "~4.4.0",
|
||||
"@vue/cli-plugin-unit-mocha": "~4.4.0",
|
||||
"@vue/cli-service": "~4.4.0",
|
||||
"@vue/test-utils": "^1.0.3",
|
||||
"chai": "^4.1.2",
|
||||
"@vitejs/plugin-vue2": "2.3.4",
|
||||
"@vue/test-utils": "^1.3.6",
|
||||
"chai": "^4.5.0",
|
||||
"csstype": "^3.2.3",
|
||||
"esbuild": "0.25.12",
|
||||
"eslint": "^7.28.0",
|
||||
"eslint-plugin-vue": "^7.11.0",
|
||||
"jsdom": "^28.0.0",
|
||||
"playwright": "1.62.1",
|
||||
"sass": "^1.26.5",
|
||||
"sass-loader": "^8.0.2",
|
||||
"sass": "^1.97.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vue-template-compiler": "^2.6.11",
|
||||
"vite": "7.2.0",
|
||||
"vitest": "^4.1.0",
|
||||
"vue-template-compiler": "2.7.16",
|
||||
"zod": "^4.6.2"
|
||||
},
|
||||
"files": [
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico">-->
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong
|
||||
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript
|
||||
enabled. Please enable it to continue.</strong
|
||||
>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -44,6 +44,9 @@ try {
|
|||
const page = await browser.newPage({ viewport: { width, height: 900 } });
|
||||
const errors = [];
|
||||
page.on('pageerror', (e) => errors.push(e.message));
|
||||
page.on('console', (msg) => {
|
||||
if (msg.type() === 'error') console.error(msg.text());
|
||||
});
|
||||
await page.goto(`http://127.0.0.1:${server.address().port}/`);
|
||||
let state = engine.setup(3, { offshoreIsland: true }, 'offshore-browser');
|
||||
const player = state.currentPlayers[0];
|
||||
|
|
@ -67,25 +70,54 @@ try {
|
|||
host.emit('state', state);
|
||||
}, engine.stripSecret(copy(state), player));
|
||||
};
|
||||
await page.waitForSelector('.offshore-lot', { state: 'attached' });
|
||||
if (width <= 600) {
|
||||
assert.equal(await page.locator('.bank-toggle').getAttribute('aria-expanded'), 'false');
|
||||
await page.getByRole('button', { name: 'Show bank', exact: true }).click();
|
||||
}
|
||||
assert.equal(await page.locator('.offshore-lot').count(), 6);
|
||||
await page.locator('.offshore-lot').nth(3).getByRole('button', { name: 'Call Bank', exact: true }).click();
|
||||
await page.locator('#bank-cash-bid').fill('2');
|
||||
await page.getByRole('button', { name: 'Place public bid', exact: true }).click();
|
||||
await page.waitForSelector('.offshore-bank .offshore-lot', { state: 'attached' });
|
||||
assert.equal(await page.locator('.offshore-bank .offshore-lot').count(), 6);
|
||||
assert.equal(await page.locator('text=OPTIONAL EXPANSION').count(), 0);
|
||||
await page.locator('.offshore-lot[data-type="containers"][data-lot="2"]').click();
|
||||
const calculator = page.locator('[data-tutorial="bank-bid"]');
|
||||
await calculator.focus();
|
||||
await calculator.press('9');
|
||||
await calculator.press('9');
|
||||
await calculator.press('9');
|
||||
await calculator.getByRole('button', { name: 'Bid', exact: true }).click();
|
||||
assert.equal(await page.evaluate(() => moves.length), 0, 'invalid cash offer is not submitted');
|
||||
await calculator.locator('rect[y="130"][x="50"]').click();
|
||||
await page.screenshot({ path: `/tmp/container-offshore-draft-${width}.png`, fullPage: true });
|
||||
await calculator.getByRole('button', { name: 'Bid', exact: true }).click();
|
||||
const bid = await page.evaluate(() => moves.at(-1));
|
||||
assert.equal(bid.at(-1).name, 'callBank');
|
||||
assert.equal(bid.at(-1).data.lot, 2);
|
||||
for (const action of bid) state = engine.move(state, action, player);
|
||||
await push();
|
||||
assert.match(await page.locator('.offshore-lot').nth(3).innerText(), /Cash in escrow: \$2/);
|
||||
assert.match(
|
||||
await page.locator('.offshore-lot[data-type="containers"][data-lot="2"]').locator('..').textContent(),
|
||||
/\$2/
|
||||
);
|
||||
|
||||
await page.getByRole('button', { name: 'Hide bank', exact: true }).click();
|
||||
// A returned container is a committed interruption belonging to its owner.
|
||||
// A fresh turn fixture: calling the bank twice in one turn is illegal.
|
||||
state = engine.setup(3, { offshoreIsland: true }, 'offshore-browser');
|
||||
state.players.forEach((p, i) => (p.name = ['Ada', 'Benoît', 'Cleo'][i]));
|
||||
state.newTurn = true;
|
||||
const offered = state.players[player].containersOnFactoryStore[0].piece;
|
||||
const second = state.containersLeft.pop();
|
||||
state.players[player].containersOnWarehouseStore.push({ piece: second, price: 3, moved: false });
|
||||
await push();
|
||||
await page.locator('.offshore-lot[data-type="cash"][data-lot="1"]').click();
|
||||
await page.locator(`.bank-draft [data-piece-id="${offered.id}"]`).click();
|
||||
await page.locator(`.bank-draft [data-piece-id="${second.id}"]`).click();
|
||||
assert.equal(await page.evaluate(() => moves.length), 0, 'selection never auto-submits');
|
||||
await page.getByRole('button', { name: 'Confirm offer', exact: true }).click();
|
||||
const cargoBid = await page.evaluate(() => moves.at(-1));
|
||||
assert.equal(cargoBid.at(-1).name, 'callBank');
|
||||
assert.equal(cargoBid.at(-1).data.lot, 1);
|
||||
assert.deepEqual(cargoBid.at(-1).extraData.containers, [offered.id, second.id]);
|
||||
for (const action of cargoBid) state = engine.move(state, action, player);
|
||||
await push();
|
||||
|
||||
// The decision is on-board too: no HTML cards, forms, expansion eyebrow or toggle.
|
||||
assert.equal(await page.locator('.bank-toggle, #offshore-title, .bank-decision form').count(), 0);
|
||||
const own = state.players[player];
|
||||
const returned = own.containersOnFactoryStore.pop();
|
||||
const returned = { piece: state.containersLeft.pop(), price: 2, moved: false };
|
||||
assert.ok(returned);
|
||||
state.newTurn = true;
|
||||
state.phase = 'bankDecision';
|
||||
|
|
@ -102,16 +134,17 @@ try {
|
|||
host.emit('player', { index: undefined });
|
||||
host.emit('state', state);
|
||||
}, engine.stripSecret(copy(state)));
|
||||
await page.getByRole('button', { name: 'Show bank', exact: true }).click();
|
||||
await page.waitForFunction(() =>
|
||||
document.querySelector('.bank-decision')?.textContent.includes('Awaiting bank choice')
|
||||
);
|
||||
await page.waitForFunction(() => document.querySelector('.bank-decision')?.textContent.includes('Outbid'));
|
||||
assert.equal(
|
||||
await page.locator('.bank-decision .offshore-cargo-piece').count(),
|
||||
await page.locator('.bank-decision [data-piece-id]').count(),
|
||||
1,
|
||||
'spectator sees pending return cargo'
|
||||
);
|
||||
assert.equal(await page.locator('.bank-decision button').count(), 0, 'spectator has no decision controls');
|
||||
assert.equal(
|
||||
await page.locator('.bank-decision [role="button"]').count(),
|
||||
0,
|
||||
'spectator has no decision controls'
|
||||
);
|
||||
await page.evaluate((player) => host.emit('player', { index: player }), player);
|
||||
await push();
|
||||
await page.getByRole('button', { name: 'Return at $3', exact: true }).click();
|
||||
|
|
@ -120,25 +153,42 @@ try {
|
|||
state = engine.move(state, repricing[0], player);
|
||||
assert.equal(state.newTurn, true);
|
||||
await push();
|
||||
assert.equal(await page.locator('.bank-choice').count(), 0);
|
||||
assert.equal(await page.locator('.bank-decision').count(), 0);
|
||||
assert.equal(
|
||||
state.players[player].containersOnFactoryStore.find((c) => c.piece.id === returned.piece.id).price,
|
||||
3
|
||||
);
|
||||
|
||||
// Public lots and escrow remain visible after French localization and on phones.
|
||||
// Existing journal localization works without a separate web-style panel.
|
||||
await page.evaluate(() => host.emit('preferences', { locale: 'fr' }));
|
||||
await page.waitForFunction(() => document.querySelector('#offshore-title')?.textContent === 'Île offshore');
|
||||
assert.match(await page.locator('.offshore-bank').innerText(), /Lot d’argent/);
|
||||
assert.match(await page.locator('.offshore-bank').innerText(), /Argent consigné/);
|
||||
await page.waitForFunction(() =>
|
||||
document.querySelector('.inline-game-log')?.textContent.includes('appelle la banque')
|
||||
);
|
||||
assert.match(await page.locator('.inline-game-log').innerText(), /appelle la banque/);
|
||||
assert.match(await page.locator('.inline-game-log').innerText(), /remet un conteneur/);
|
||||
const bounds = await page.locator('.offshore-bank').boundingBox();
|
||||
assert.ok(bounds.x >= 0 && bounds.x + bounds.width <= width + 1, 'panel fits viewport');
|
||||
assert.equal(await page.locator('.offshore-bank').evaluate((el) => el.scrollWidth <= el.clientWidth + 1), true);
|
||||
await page.locator('.board-scroll').evaluate((el) => {
|
||||
el.scrollLeft = 0;
|
||||
});
|
||||
await page.waitForTimeout(100);
|
||||
const bounds = await page.locator('.bank-board').boundingBox();
|
||||
assert.ok(bounds.x >= 0 && bounds.x + bounds.width <= width + 1, 'bank visible within board viewport');
|
||||
await page.screenshot({ path: `/tmp/container-offshore-${width}.png`, fullPage: true });
|
||||
await page.evaluate(() => host.emit('preferences', { locale: 'en' }));
|
||||
|
||||
// Arrival-only pickup, using the displayed holding cargo (no component internals).
|
||||
state.players[player].ship.shipPosition = 'offshoreBank';
|
||||
state.players[player].lastMove = { name: 'sail', data: 'offshoreBank' };
|
||||
const pickup = state.containersLeft.pop();
|
||||
state.players[player].bankHolding.push(pickup);
|
||||
state.newTurn = true;
|
||||
await push();
|
||||
await page.locator(`.bank-holding [data-piece-id="${pickup.id}"]`).click();
|
||||
const loading = await page.evaluate(() => moves.at(-1));
|
||||
assert.equal(loading.at(-1).name, 'loadBankContainer');
|
||||
for (const action of loading) state = engine.move(state, action, player);
|
||||
assert.ok(state.players[player].ship.containers.some((piece) => piece.id === pickup.id));
|
||||
await push();
|
||||
|
||||
// Final cash settlement must remain clickable with opponents' point cards stripped.
|
||||
const payment = state.players[player].containersOnFactoryStore.pop();
|
||||
const auction = {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<title v-else-if="data && data.type == 'supply'">Supply</title>
|
||||
<title v-else-if="data && data.type == 'openSea'">Open Sea</title>
|
||||
<title v-else-if="data && data.type == 'islandHarbor'">Island Harbor</title>
|
||||
<title v-else-if="data && data.type == 'offshoreBank'">Offshore Bank</title>
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
|
@ -137,6 +138,11 @@ export default class DropZone extends Vue {
|
|||
}
|
||||
} else if (this.activePiece.pieceType == PieceType.Ship) {
|
||||
const ship = this.activePiece as Ship;
|
||||
if (
|
||||
this.data.type === DropZoneType.OffshoreBank &&
|
||||
!this.availableMoves?.[MoveName.Sail]?.includes(ShipPosition.OffshoreBank)
|
||||
)
|
||||
return false;
|
||||
if (ship.position == ShipPosition.OpenSea) {
|
||||
if (this.data.type == DropZoneType.OpenSea) return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
}}</span
|
||||
><span class="player-board-name" :data-bgs-player="i">{{ i === player ? 'You' : p.name }}</span>
|
||||
</button>
|
||||
<button v-if="G.options.offshoreIsland" @click="viewBank()">Bank</button>
|
||||
</div>
|
||||
<div v-if="!ui.selected && mobileOffers.length" class="mobile-trade" aria-label="Containers for sale">
|
||||
<span>Buy from {{ G.players[mobilePlayer].name }}</span>
|
||||
|
|
@ -59,14 +60,6 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<OffshoreBank
|
||||
v-if="G && G.options.offshoreIsland"
|
||||
:state="G"
|
||||
:player="player"
|
||||
:color-blind="preferences.colorBlind"
|
||||
:available-moves="canMove ? G.players[player].availableMoves : {}"
|
||||
@move="sendMove"
|
||||
/>
|
||||
<div key="board-and-journal" class="board-and-journal">
|
||||
<div ref="boardScroll" class="board-scroll" tabindex="0" aria-label="Game board">
|
||||
<svg
|
||||
|
|
@ -74,8 +67,9 @@
|
|||
@keydown.esc="ui.selected = null"
|
||||
id="scene"
|
||||
data-tutorial="game-board"
|
||||
viewBox="0 0 1250 650"
|
||||
height="650"
|
||||
:viewBox="`0 0 1250 ${G && G.options.offshoreIsland ? 950 : 650}`"
|
||||
:height="G && G.options.offshoreIsland ? 950 : 650"
|
||||
:style="{ aspectRatio: G && G.options.offshoreIsland ? '1250 / 950' : '1250 / 650' }"
|
||||
>
|
||||
<defs>
|
||||
<linearGradient id="container-sea" x2="0" y2="1">
|
||||
|
|
@ -199,12 +193,26 @@
|
|||
:data="{ type: 'islandHarbor' }"
|
||||
/>
|
||||
|
||||
<g v-if="G && G.options.offshoreIsland" pointer-events="none">
|
||||
<rect x="675" y="430" width="90" height="220" rx="12" fill="#f6f4e9" stroke="#8ca9aa" />
|
||||
<text x="720" y="425" text-anchor="middle" fill="#315f66" font-size="9">
|
||||
Offshore bank harbor
|
||||
</text>
|
||||
<g v-if="G && G.options.offshoreIsland">
|
||||
<OffshoreBank
|
||||
:state="G"
|
||||
:player="player"
|
||||
:player-colors="playerColors"
|
||||
:available-moves="canMove ? G.players[player].availableMoves : {}"
|
||||
@move="sendBankMove"
|
||||
@choose-offer="chooseBankOffer"
|
||||
/>
|
||||
</g>
|
||||
<DropZone
|
||||
v-if="G && G.options.offshoreIsland"
|
||||
transform="translate(1100 665)"
|
||||
:width="140"
|
||||
:height="240"
|
||||
:enabled="true"
|
||||
:accepts="'ship'"
|
||||
:data="{ type: 'offshoreBank' }"
|
||||
:available-moves="getCurrentPlayerMoves()"
|
||||
/>
|
||||
<Ship
|
||||
v-for="ship in ships"
|
||||
:key="ship.id"
|
||||
|
|
@ -281,7 +289,7 @@
|
|||
<text x="0" y="0">Your island: ${{ ownIslandValue }}</text>
|
||||
</g>
|
||||
|
||||
<template v-if="G && player != undefined">
|
||||
<template v-if="G && player != undefined && G.players[player].pointCard">
|
||||
<text x="20" y="440">Money: ${{ G.players[player].money }}</text>
|
||||
<PointCard :pointCard="G.players[player].pointCard" transform="translate(20, 460)" />
|
||||
</template>
|
||||
|
|
@ -334,7 +342,7 @@
|
|||
@click="decline()"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="G.phase == 'bid' && (G.currentPlayers.includes(player) || changingBid)">
|
||||
<template v-if="G.phase == 'bid' && (G.currentPlayers.includes(player) || changingBid)">
|
||||
<rect
|
||||
v-if="!preferences.disableHelp"
|
||||
x="135"
|
||||
|
|
@ -364,6 +372,42 @@
|
|||
</template>
|
||||
</template>
|
||||
|
||||
<g v-if="bankDraft && canMove" class="bank-draft" transform="translate(310 680)">
|
||||
<text x="0" y="-8" font-size="12">
|
||||
{{ bankDraft.type === 'cash' ? 'Offer cargo' : 'Offer cash' }} · Lot {{ bankDraft.lot + 1 }}
|
||||
</text>
|
||||
<Calculator
|
||||
v-if="bankDraft.type === 'containers'"
|
||||
:key="bankDraft.lot + ':' + draftsVersion"
|
||||
ref="bankCalculator"
|
||||
tabindex="0"
|
||||
role="group"
|
||||
aria-label="Cash offer: type digits, Backspace to delete, Enter to bid"
|
||||
@keydown.native="bankCalculatorKey"
|
||||
data-tutorial="bank-bid"
|
||||
@bid="bankBid"
|
||||
/>
|
||||
<template v-else>
|
||||
<OffshoreCargo
|
||||
:pieces="bankBidCargo"
|
||||
:columns="8"
|
||||
:rows="8"
|
||||
:selectable="bankContainerHighlights"
|
||||
:selected="Array.from(offshoreContainers)"
|
||||
@select="toggleBankContainer"
|
||||
/>
|
||||
<Button
|
||||
transform="translate(0 155)"
|
||||
:width="130"
|
||||
text="Confirm offer"
|
||||
:enabled="validContainerBid"
|
||||
@click="confirmBankContainers"
|
||||
/>
|
||||
</template>
|
||||
<text v-if="bankBidError" x="0" y="215" font-size="11" fill="#9b2424">Invalid offer</text>
|
||||
<Button transform="translate(0 220)" :width="130" text="Cancel" @click="resetBankDraft" />
|
||||
</g>
|
||||
|
||||
<Button
|
||||
v-if="revisableBid && !changingBid"
|
||||
transform="translate(140, 430)"
|
||||
|
|
@ -381,6 +425,21 @@
|
|||
/>
|
||||
</template>
|
||||
|
||||
<template v-if="!preferences.disableHelp && canMove">
|
||||
<g v-for="pieceId in bankContainerHighlights" :key="'bank-cargo-' + pieceId">
|
||||
<rect
|
||||
v-for="piece in containers.filter((p) => p.id === pieceId)"
|
||||
:key="piece.id"
|
||||
:x="piece.x - 2"
|
||||
:y="piece.y - 2"
|
||||
width="24"
|
||||
height="14"
|
||||
fill="none"
|
||||
stroke="blue"
|
||||
stroke-width="2"
|
||||
/>
|
||||
</g>
|
||||
</template>
|
||||
<template v-if="!preferences.disableHelp">
|
||||
<template v-if="ui.dragged == null && ui.selected == null">
|
||||
<rect
|
||||
|
|
@ -750,6 +809,8 @@
|
|||
<script lang="ts">
|
||||
import InlineLog from './InlineLog.vue';
|
||||
import OffshoreBank from './OffshoreBank.vue';
|
||||
import OffshoreCargo from './OffshoreCargo.vue';
|
||||
import { legalBankAction } from '../offshore-actions';
|
||||
import { islandValue } from '../island-value';
|
||||
import ColorBlindButton from './buttons/ColorBlindButton.vue';
|
||||
import { colorBadgeHtml } from '../color-blind';
|
||||
|
|
@ -780,6 +841,7 @@ import { GameEventName, LogMove } from 'container-engine/src/log';
|
|||
components: {
|
||||
InlineLog,
|
||||
OffshoreBank,
|
||||
OffshoreCargo,
|
||||
PlayerBoard,
|
||||
Container,
|
||||
Factory,
|
||||
|
|
@ -937,6 +999,17 @@ export default class Game extends Vue {
|
|||
this.G = JSON.parse(JSON.stringify(state));
|
||||
|
||||
this.createPieces();
|
||||
if (this.G?.offshoreBank?.decision?.player === this.player) {
|
||||
this.$nextTick(() =>
|
||||
this.$el.querySelector('.bank-decision')?.scrollIntoView?.({ block: 'nearest', inline: 'start' })
|
||||
);
|
||||
} else if (this.canMove && this.getCurrentPlayerMoves()[MoveName.LoadBankContainer]?.length) {
|
||||
this.$nextTick(() =>
|
||||
this.$el
|
||||
.querySelector(`.bank-holding[data-owner="${this.player}"]`)
|
||||
?.scrollIntoView?.({ block: 'nearest', inline: 'start' })
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
createPieces() {
|
||||
|
|
@ -1107,8 +1180,8 @@ export default class Game extends Vue {
|
|||
case ShipPosition.OffshoreBank:
|
||||
this.ships.push({
|
||||
id: player.ship.piece.id,
|
||||
x: 700,
|
||||
y: 410 + pi * 44,
|
||||
x: 1125,
|
||||
y: 670 + pi * 45,
|
||||
rotate: 90,
|
||||
color,
|
||||
containers: player.ship.containers,
|
||||
|
|
@ -1286,7 +1359,9 @@ export default class Game extends Vue {
|
|||
|
||||
case PieceType.Container:
|
||||
const container = e as Container;
|
||||
if (container.state == ContainerState.OnBoard) {
|
||||
if (d.type === 'offshoreBid') {
|
||||
this.sendBankContainerBid(container.pieceId);
|
||||
} else if (container.state == ContainerState.OnBoard) {
|
||||
if (d.type == DropZoneType.FactoryStore) {
|
||||
this.sendMove({
|
||||
name: MoveName.Produce,
|
||||
|
|
@ -1356,6 +1431,8 @@ export default class Game extends Vue {
|
|||
if (d.type.startsWith('playerHarbor')) {
|
||||
if (!player.ship.shipPosition.startsWith('playerHarbor'))
|
||||
this.sendMove({ name: MoveName.Sail, data: d.type });
|
||||
} else if (d.type === DropZoneType.OffshoreBank) {
|
||||
this.sendMove({ name: MoveName.Sail, data: ShipPosition.OffshoreBank });
|
||||
} else if (d.type === DropZoneType.OpenSea) {
|
||||
if (player.ship.shipPosition !== ShipPosition.OpenSea)
|
||||
this.sendMove({ name: MoveName.Sail, data: ShipPosition.OpenSea });
|
||||
|
|
@ -1443,6 +1520,7 @@ export default class Game extends Vue {
|
|||
|
||||
/** Discard unsent choices: selection, bid drafts and pending confirmations. */
|
||||
resetDrafts() {
|
||||
this.resetBankDraft();
|
||||
this.ui.selected = null;
|
||||
this.editingBid = null;
|
||||
this.confirmBidVisible = false;
|
||||
|
|
@ -1502,6 +1580,98 @@ export default class Game extends Vue {
|
|||
this.confirmBidRevision = null;
|
||||
}
|
||||
|
||||
@Watch('G')
|
||||
@Watch('player')
|
||||
@Watch('interactionDisabled')
|
||||
resetBankDraft() {
|
||||
this.bankDraft = null;
|
||||
this.offshoreContainers = new Set();
|
||||
this.bankBidError = false;
|
||||
}
|
||||
bankDraft: { type: 'cash' | 'containers'; lot: number } | null = null;
|
||||
bankBidError = false;
|
||||
offshoreContainers = new Set<string>();
|
||||
viewBank(action = false) {
|
||||
this.$nextTick(() => {
|
||||
const target = this.$el.querySelector(
|
||||
action ? '.bank-draft' : this.G?.offshoreBank?.decision ? '.bank-decision' : '.bank-board'
|
||||
);
|
||||
target?.scrollIntoView?.({ block: 'nearest', inline: 'start', behavior: 'auto' });
|
||||
});
|
||||
}
|
||||
chooseBankOffer(offer: { type: 'cash' | 'containers'; lot: number }) {
|
||||
if (
|
||||
!this.canMove ||
|
||||
!this.getCurrentPlayerMoves()[MoveName.CallBank]?.some((o) => o.type === offer.type && o.lot === offer.lot)
|
||||
)
|
||||
return;
|
||||
this.resetBankDraft();
|
||||
this.bankDraft = { ...offer };
|
||||
this.draftsVersion++;
|
||||
this.viewBank(true);
|
||||
}
|
||||
sendBankMove(action: Move) {
|
||||
if (this.canMove && this.G && legalBankAction(this.G, this.player, action)) {
|
||||
this.resetBankDraft();
|
||||
this.sendMove(action);
|
||||
} else this.bankBidError = true;
|
||||
}
|
||||
bankCalculatorKey(event: KeyboardEvent) {
|
||||
const calculator = this.$refs.bankCalculator as Calculator;
|
||||
if (/^[0-9]$/.test(event.key)) {
|
||||
event.preventDefault();
|
||||
calculator.add(Number(event.key));
|
||||
} else if (event.key === 'Backspace') {
|
||||
event.preventDefault();
|
||||
calculator.del();
|
||||
} else if (event.key === 'Enter' && event.target === calculator.$el) {
|
||||
event.preventDefault();
|
||||
calculator.bid();
|
||||
}
|
||||
}
|
||||
bankBid(cash: number) {
|
||||
if (this.bankDraft?.type !== 'containers') return;
|
||||
this.sendBankMove({ name: MoveName.CallBank, data: { ...this.bankDraft }, extraData: { cash } });
|
||||
}
|
||||
get bankBidCargo() {
|
||||
if (!this.canMove) return [];
|
||||
const p = this.G!.players[this.player!];
|
||||
return [...p.containersOnFactoryStore, ...p.containersOnWarehouseStore]
|
||||
.filter((c) => !c.moved)
|
||||
.map((c) => ({ ...c.piece, price: c.price }));
|
||||
}
|
||||
get bankContainerHighlights() {
|
||||
return this.bankCashOffer ? this.bankBidCargo.map((c) => c.id) : [];
|
||||
}
|
||||
get bankCashOffer() {
|
||||
return !!this.canMove && this.bankDraft?.type === 'cash';
|
||||
}
|
||||
bankContainerBid(): Move | undefined {
|
||||
if (!this.bankCashOffer) return;
|
||||
return {
|
||||
name: MoveName.CallBank,
|
||||
data: { ...this.bankDraft! },
|
||||
extraData: { containers: Array.from(this.offshoreContainers) },
|
||||
};
|
||||
}
|
||||
get validContainerBid() {
|
||||
const action = this.bankContainerBid();
|
||||
return !!action && !!this.G && legalBankAction(this.G, this.player, action);
|
||||
}
|
||||
confirmBankContainers() {
|
||||
const action = this.bankContainerBid();
|
||||
if (action) this.sendBankMove(action);
|
||||
}
|
||||
sendBankContainerBid(pieceId: string) {
|
||||
this.toggleBankContainer(pieceId);
|
||||
}
|
||||
toggleBankContainer(id: string) {
|
||||
if (!this.bankContainerHighlights.includes(id)) return;
|
||||
const selected = new Set(this.offshoreContainers);
|
||||
if (selected.has(id)) selected.delete(id);
|
||||
else selected.add(id);
|
||||
this.offshoreContainers = selected;
|
||||
}
|
||||
confirmSail() {
|
||||
this.confirmSailVisible = false;
|
||||
this.sendMove({ name: MoveName.Sail, data: ShipPosition.Island });
|
||||
|
|
@ -1516,6 +1686,18 @@ export default class Game extends Vue {
|
|||
}
|
||||
|
||||
sendMove(move: Move) {
|
||||
if (
|
||||
[
|
||||
MoveName.CallBank,
|
||||
MoveName.LoadBankContainer,
|
||||
MoveName.ReturnBankContainer,
|
||||
MoveName.DistributeBankContainer,
|
||||
MoveName.SeizeBankContainer,
|
||||
].includes(move.name) ||
|
||||
(move.name === MoveName.Sail && move.data === ShipPosition.OffshoreBank)
|
||||
) {
|
||||
if (!this.canMove || !this.G || !legalBankAction(this.G, this.player, move)) return;
|
||||
}
|
||||
if (this.tutorialMove) {
|
||||
if (!this.interactionDisabled) this.tutorialMove(move);
|
||||
return;
|
||||
|
|
@ -1710,7 +1892,7 @@ export default class Game extends Vue {
|
|||
if (!this.G || ended(this.G)) {
|
||||
return 'Game ended!';
|
||||
} else if (this.player !== undefined && this.G?.currentPlayers.includes(this.player)) {
|
||||
if (this.G.offshoreBank?.decision) return 'Choose your bank decision in the Offshore Island panel.';
|
||||
if (this.G.offshoreBank?.decision) return 'Choose a bank action.';
|
||||
if (this.G.players[this.player].availableMoves![MoveName.Bid]) {
|
||||
if (this.G.highestBidders.length != 0) {
|
||||
return "It's a tie, choose your ADDITIONAL bid!";
|
||||
|
|
|
|||
|
|
@ -1,312 +1,262 @@
|
|||
<template>
|
||||
<section v-if="state.options.offshoreIsland && bank" class="offshore-bank" aria-labelledby="offshore-title">
|
||||
<header class="offshore-header">
|
||||
<div>
|
||||
<span class="offshore-eyebrow">OPTIONAL EXPANSION</span>
|
||||
<h2 id="offshore-title">Offshore Island</h2>
|
||||
</div>
|
||||
<div class="bank-summary">
|
||||
<span
|
||||
><span>Public auctions</span>: {{ bank.auctions.length }} · <span>Your holding</span>:
|
||||
{{ ownPlayer && ownPlayer.bankHolding ? ownPlayer.bankHolding.length : 0 }}</span
|
||||
<g v-if="state.options.offshoreIsland && bank" class="offshore-bank">
|
||||
<g transform="translate(20 680)" class="bank-board">
|
||||
<text x="0" y="-12" font-size="10" fill="#45585b">OFFSHORE BANK</text>
|
||||
<template v-for="(type, row) in ['cash', 'containers']">
|
||||
<g
|
||||
v-for="i in 3"
|
||||
:key="type + i"
|
||||
@click.stop="chooseOffer(type, i - 1)"
|
||||
:transform="`translate(${(i - 1) * 88} ${row * 88})`"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="bank-button bank-toggle"
|
||||
:aria-expanded="expanded ? 'true' : 'false'"
|
||||
aria-controls="offshore-content"
|
||||
@click="expanded = !expanded"
|
||||
<rect
|
||||
class="offshore-lot"
|
||||
:class="{ legal: offer(type, i - 1) }"
|
||||
:data-type="type"
|
||||
:data-lot="i - 1"
|
||||
width="84"
|
||||
height="82"
|
||||
fill="#e2e0d3"
|
||||
stroke="#899997"
|
||||
:role="offer(type, i - 1) ? 'button' : undefined"
|
||||
:tabindex="offer(type, i - 1) ? 0 : undefined"
|
||||
:aria-label="
|
||||
(type === 'cash' ? 'Cash' : 'Container') +
|
||||
' lot ' +
|
||||
i +
|
||||
(type === 'cash'
|
||||
? ': $' + bank.cashLots[i - 1]
|
||||
: ': ' + bank.containerLots[i - 1].length + ' containers')
|
||||
"
|
||||
@click.stop="chooseOffer(type, i - 1)"
|
||||
@keydown.enter.prevent.stop="chooseOffer(type, i - 1)"
|
||||
@keydown.space.prevent.stop="chooseOffer(type, i - 1)"
|
||||
>
|
||||
{{ expanded ? 'Hide bank' : 'Show bank' }}
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
<div id="offshore-content" v-show="expanded">
|
||||
<div class="offshore-lots">
|
||||
<article v-for="(cash, i) in bank.cashLots" :key="'cash' + i" class="offshore-lot">
|
||||
<h3>
|
||||
<span>Cash lot</span> {{ i + 1 }} <strong>${{ cash }}</strong>
|
||||
</h3>
|
||||
<div v-if="auction('cash', i)" class="offshore-escrow">
|
||||
<span>Leading bidder</span>: <b translate="no">{{ owner(auction('cash', i).bidder) }}</b>
|
||||
<OffshoreCargo :pieces="escrow(auction('cash', i))" :color-blind="colorBlind" />
|
||||
</div>
|
||||
<p v-else class="offshore-muted">No public bid</p>
|
||||
<button v-if="offer('cash', i)" type="button" class="bank-button" @click="chooseOffer('cash', i)">
|
||||
Call Bank
|
||||
</button>
|
||||
</article>
|
||||
<article v-for="(cargo, i) in bank.containerLots" :key="'containers' + i" class="offshore-lot">
|
||||
<h3>
|
||||
<span>Container lot</span> {{ i + 1 }} <strong>{{ cargo.length }}</strong>
|
||||
</h3>
|
||||
<OffshoreCargo :pieces="cargo" :color-blind="colorBlind" />
|
||||
<p v-if="auction('containers', i)" class="offshore-escrow">
|
||||
<span>Leading bidder</span>:
|
||||
<b translate="no">{{ owner(auction('containers', i).bidder) }}</b> ·
|
||||
<span>Cash in escrow</span>: ${{ auction('containers', i).cash }}
|
||||
</p>
|
||||
<p v-else class="offshore-muted">No public bid</p>
|
||||
<button
|
||||
v-if="offer('containers', i)"
|
||||
type="button"
|
||||
class="bank-button"
|
||||
@click="chooseOffer('containers', i)"
|
||||
<title>{{ type === 'cash' ? 'Cash' : 'Container' }} lot {{ i }}</title>
|
||||
</rect>
|
||||
<text x="77" y="12" text-anchor="end" font-size="8" pointer-events="none">{{ i }}</text>
|
||||
<text v-if="type === 'cash'" x="6" y="18" font-size="14" pointer-events="none"
|
||||
>${{ bank.cashLots[i - 1] }}</text
|
||||
>
|
||||
Call Bank
|
||||
</button>
|
||||
</article>
|
||||
</div>
|
||||
<form
|
||||
v-if="selectedOffer && offer(selectedOffer.type, selectedOffer.lot)"
|
||||
class="bank-decision"
|
||||
@submit.prevent="submitBid"
|
||||
>
|
||||
<h3>
|
||||
<span>Call Bank</span> ·
|
||||
<span>{{ selectedOffer.type === 'cash' ? 'Cash lot' : 'Container lot' }}</span>
|
||||
{{ selectedOffer.lot + 1 }}
|
||||
</h3>
|
||||
<template v-if="selectedOffer.type === 'containers'">
|
||||
<label for="bank-cash-bid">Cash bid</label>
|
||||
<input
|
||||
id="bank-cash-bid"
|
||||
v-model.number="cashBid"
|
||||
type="number"
|
||||
min="1"
|
||||
step="1"
|
||||
inputmode="numeric"
|
||||
<OffshoreCargo
|
||||
v-else
|
||||
:pieces="bank.containerLots[i - 1]"
|
||||
transform="translate(6 19)"
|
||||
:columns="3"
|
||||
:rows="2"
|
||||
/>
|
||||
<p>Cash is placed in public escrow until outbid or collected.</p>
|
||||
<g v-if="auction(type, i - 1)">
|
||||
<rect
|
||||
x="1"
|
||||
:y="type === 'cash' ? 25 : 70"
|
||||
width="3"
|
||||
height="11"
|
||||
:fill="playerColors[auction(type, i - 1).bidder]"
|
||||
/>
|
||||
<title translate="no">{{ owner(auction(type, i - 1).bidder) }}</title>
|
||||
<text x="6" :y="type === 'cash' ? 31 : 76" font-size="8" fill="#203a45" translate="no"
|
||||
>{{ playerLabel(auction(type, i - 1).bidder)
|
||||
}}<title translate="no">{{ owner(auction(type, i - 1).bidder) }}</title></text
|
||||
>
|
||||
<OffshoreCargo
|
||||
v-if="type === 'cash'"
|
||||
:pieces="escrow(auction(type, i - 1))"
|
||||
transform="translate(6 36)"
|
||||
:columns="3"
|
||||
:rows="2"
|
||||
/>
|
||||
<text v-else x="78" y="76" font-size="10" text-anchor="end"
|
||||
>${{ auction(type, i - 1).cash }}</text
|
||||
>
|
||||
</g>
|
||||
</g>
|
||||
</template>
|
||||
<Button
|
||||
v-if="canSail"
|
||||
transform="translate(0 240)"
|
||||
:width="130"
|
||||
text="Sail to bank"
|
||||
@click="emitMove({ name: names.Sail, data: 'offshoreBank' })"
|
||||
/>
|
||||
</g>
|
||||
<text x="1100" y="665" font-size="9" fill="#45585b">BANK HARBOR</text>
|
||||
<g
|
||||
v-for="({ p, i }, index) in holdings"
|
||||
:key="'holding' + i"
|
||||
:transform="`translate(${600 + Math.floor(index / 3) * 240} ${680 + (index % 3) * 85})`"
|
||||
class="bank-holding"
|
||||
:data-owner="i"
|
||||
>
|
||||
<rect x="0" y="-8" width="3" height="12" :fill="playerColors[i]" />
|
||||
<text x="7" y="0" font-size="10" fill="#203a45" translate="no"
|
||||
>{{ playerLabel(i) }}<title translate="no">{{ owner(i) }}: bank holding</title></text
|
||||
>
|
||||
<OffshoreCargo
|
||||
:pieces="p.bankHolding || []"
|
||||
transform="translate(0 12)"
|
||||
:columns="9"
|
||||
:rows="3"
|
||||
:selectable="
|
||||
canAct && i === player
|
||||
? (availableMoves[names.LoadBankContainer] || []).map((piece) => piece.id)
|
||||
: []
|
||||
"
|
||||
@select="loadContainer"
|
||||
/>
|
||||
</g>
|
||||
<g v-if="bank.decision" class="bank-decision" transform="translate(310 680)">
|
||||
<text x="0" y="0" font-size="14">{{ decisionTitle }}</text>
|
||||
<template v-if="!decisionMoves.length">
|
||||
<text x="0" y="20" font-size="12" fill="#203a45" translate="no"
|
||||
>{{ playerLabel(bank.decision.player)
|
||||
}}<title translate="no">{{ owner(bank.decision.player) }}</title></text
|
||||
>
|
||||
<OffshoreCargo :pieces="pendingCargo" transform="translate(0 35)" :columns="10" :rows="8" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<p>Select containers from your stores. Your bid must exceed the current public bid.</p>
|
||||
<h4>Factory store</h4>
|
||||
<OffshoreCargo
|
||||
:pieces="factoryCargo"
|
||||
:selectable="storeIds"
|
||||
:selected="selectedIds"
|
||||
:color-blind="colorBlind"
|
||||
@select="toggleContainer"
|
||||
/>
|
||||
<h4>Warehouse store</h4>
|
||||
<OffshoreCargo
|
||||
:pieces="warehouseCargo"
|
||||
:selectable="storeIds"
|
||||
:selected="selectedIds"
|
||||
:color-blind="colorBlind"
|
||||
@select="toggleContainer"
|
||||
/>
|
||||
<p><span>Selected containers</span>: {{ selectedIds.length }}</p>
|
||||
</template>
|
||||
<button class="bank-button primary" type="submit" :disabled="!bidIsLegal">Place public bid</button>
|
||||
<button class="bank-button" type="button" @click="selectedOffer = null">Cancel</button>
|
||||
<p v-if="!bidIsLegal" class="bank-hint">
|
||||
Choose a higher bid using your available cash or stored containers.
|
||||
</p>
|
||||
</form>
|
||||
<section v-if="bank.decision && !decisionMoves.length" class="bank-decision" aria-live="polite">
|
||||
<h3>{{ decisionTitle }}</h3>
|
||||
<p>
|
||||
<span>Awaiting bank choice</span>: <b translate="no">{{ owner(bank.decision.player) }}</b>
|
||||
</p>
|
||||
<OffshoreCargo :pieces="pendingCargo" :color-blind="colorBlind" />
|
||||
</section>
|
||||
<section v-if="decisionMoves.length" class="bank-decision" aria-live="polite">
|
||||
<h3>{{ decisionTitle }}</h3>
|
||||
<p v-if="bank.decision && bank.decision.kind === 'return'">
|
||||
Choose a new selling price for each returned container.
|
||||
</p>
|
||||
<p v-if="bank.decision && bank.decision.kind === 'distribute'">
|
||||
<span>Next container goes to lot</span> {{ distributionLot + 1 }}.
|
||||
<span>Choose the order of distribution.</span>
|
||||
</p>
|
||||
<p v-if="bank.decision && bank.decision.kind === 'seize'">
|
||||
Choose a container to cover unpaid interest.
|
||||
</p>
|
||||
<div v-for="choice in decisionMoves" :key="choice.data.id" class="bank-choice">
|
||||
<OffshoreCargo :pieces="[choice.data]" :color-blind="colorBlind" />
|
||||
<text v-if="bank.decision.kind === 'distribute'" x="0" y="20" font-size="11"
|
||||
>Lot {{ distributionLot + 1 }}</text
|
||||
>
|
||||
<g
|
||||
v-for="(choice, index) in visibleDecisions"
|
||||
:key="choice.data.id"
|
||||
class="bank-choice"
|
||||
:transform="`translate(0 ${40 + index * 35})`"
|
||||
>
|
||||
<OffshoreCargo :pieces="[choice.data]" />
|
||||
<template v-if="choice.name === names.ReturnBankContainer">
|
||||
<button
|
||||
<g
|
||||
v-for="price in returnPrices(choice)"
|
||||
:key="price"
|
||||
type="button"
|
||||
class="bank-button"
|
||||
@click="emitMove({ ...choice, extraData: { price } })"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
:aria-label="'Return at $' + price"
|
||||
@click.stop="emitMove({ ...choice, extraData: { price } })"
|
||||
@keydown.enter.prevent.stop="emitMove({ ...choice, extraData: { price } })"
|
||||
@keydown.space.prevent.stop="emitMove({ ...choice, extraData: { price } })"
|
||||
>
|
||||
<span>Return at</span> ${{ price }}
|
||||
</button>
|
||||
<rect
|
||||
:x="29 + (price - 1) * 30"
|
||||
y="-3"
|
||||
width="27"
|
||||
height="24"
|
||||
fill="#c6c6b8"
|
||||
stroke="#899997"
|
||||
/>
|
||||
<text :x="42 + (price - 1) * 30" y="12" text-anchor="middle" font-size="11"
|
||||
>${{ price }}</text
|
||||
>
|
||||
</g>
|
||||
</template>
|
||||
<button v-else class="bank-button" type="button" @click="emitMove(choice)">
|
||||
{{ choice.name === names.SeizeBankContainer ? 'Select for default' : 'Distribute next' }}
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
<div class="offshore-holdings">
|
||||
<article
|
||||
v-for="(p, i) in state.players"
|
||||
:key="p.id"
|
||||
class="offshore-holding"
|
||||
:class="{ own: i === player }"
|
||||
<g
|
||||
v-else
|
||||
role="button"
|
||||
tabindex="0"
|
||||
:aria-label="
|
||||
choice.name === names.SeizeBankContainer ? 'Select for default' : 'Distribute next'
|
||||
"
|
||||
@click.stop="emitMove(choice)"
|
||||
@keydown.enter.prevent.stop="emitMove(choice)"
|
||||
@keydown.space.prevent.stop="emitMove(choice)"
|
||||
>
|
||||
<h3>
|
||||
<span translate="no">{{ owner(i) }}</span> <span v-if="i === player">· You</span>
|
||||
</h3>
|
||||
<span class="offshore-muted">Holding area</span>
|
||||
<OffshoreCargo :pieces="p.bankHolding || []" :color-blind="colorBlind" />
|
||||
<template v-if="i === player">
|
||||
<button
|
||||
v-for="piece in availableMoves[names.LoadBankContainer] || []"
|
||||
:key="piece.id"
|
||||
type="button"
|
||||
class="bank-button"
|
||||
@click="emitMove({ name: names.LoadBankContainer, data: piece })"
|
||||
<rect x="29" y="-3" width="34" height="24" fill="orange" /><text
|
||||
x="46"
|
||||
y="12"
|
||||
text-anchor="middle"
|
||||
fill="white"
|
||||
>→</text
|
||||
>
|
||||
<span>Load onto ship</span> <OffshoreCargo :pieces="[piece]" :color-blind="colorBlind" />
|
||||
</button>
|
||||
</g>
|
||||
</g>
|
||||
<Button
|
||||
v-if="decisionPages > 1"
|
||||
transform="translate(0 190)"
|
||||
:width="100"
|
||||
:text="'More ' + (decisionPage + 1) + '/' + decisionPages"
|
||||
@click="decisionPage = (decisionPage + 1) % decisionPages"
|
||||
/>
|
||||
</template>
|
||||
<span v-if="!p.bankHolding || !p.bankHolding.length" class="offshore-muted">Empty</span>
|
||||
<p v-if="p.ship.shipPosition === 'offshoreBank'" class="offshore-docked">Ship docked at the bank</p>
|
||||
</article>
|
||||
</div>
|
||||
<div class="bank-navigation">
|
||||
<button
|
||||
v-if="canSailToBank"
|
||||
type="button"
|
||||
class="bank-button primary"
|
||||
@click="emitMove({ name: names.Sail, data: positions.OffshoreBank })"
|
||||
>
|
||||
Sail to offshore bank
|
||||
</button>
|
||||
<button
|
||||
v-if="canLeaveBank"
|
||||
type="button"
|
||||
class="bank-button"
|
||||
@click="emitMove({ name: names.Sail, data: positions.OpenSea })"
|
||||
>
|
||||
Sail to open sea
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</g>
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { BankAuction, BankAuctionType, GameState, ShipPosition } from 'container-engine/src/gamestate';
|
||||
import { AvailableMoves } from 'container-engine/src/available-moves';
|
||||
import { playerColors } from 'container-engine/src/engine';
|
||||
import { Move, MoveName, Moves } from 'container-engine/src/move';
|
||||
import { legalBankAction } from '../offshore-actions';
|
||||
import Button from './buttons/Button.vue';
|
||||
import OffshoreCargo from './OffshoreCargo.vue';
|
||||
|
||||
@Component({ components: { OffshoreCargo } })
|
||||
@Component({ components: { OffshoreCargo, Button } })
|
||||
export default class OffshoreBank extends Vue {
|
||||
@Prop({ required: true }) state!: GameState;
|
||||
@Prop() player?: number;
|
||||
@Prop({ default: false }) colorBlind!: boolean;
|
||||
@Prop({ default: () => ({}) }) availableMoves!: AvailableMoves;
|
||||
expanded = typeof window === 'undefined' || window.innerWidth > 600;
|
||||
|
||||
get attentionKey() {
|
||||
return [
|
||||
MoveName.ReturnBankContainer,
|
||||
MoveName.DistributeBankContainer,
|
||||
MoveName.SeizeBankContainer,
|
||||
MoveName.LoadBankContainer,
|
||||
]
|
||||
.flatMap((name) => (this.availableMoves[name] || []).map((piece) => name + ':' + piece.id))
|
||||
.join('|');
|
||||
}
|
||||
|
||||
@Watch('attentionKey', { immediate: true })
|
||||
revealRequiredChoice(key: string) {
|
||||
if (key) this.expanded = true;
|
||||
}
|
||||
|
||||
@Prop({ default: () => playerColors }) playerColors!: string[];
|
||||
names = MoveName;
|
||||
positions = ShipPosition;
|
||||
selectedOffer: { type: BankAuctionType; lot: number } | null = null;
|
||||
selectedIds: string[] = [];
|
||||
cashBid = 1;
|
||||
|
||||
@Watch('state')
|
||||
resetDraft() {
|
||||
this.selectedOffer = null;
|
||||
this.selectedIds = [];
|
||||
this.cashBid = 1;
|
||||
decisionPage = 0;
|
||||
get decisionPages() {
|
||||
return Math.max(1, Math.ceil(this.decisionMoves.length / 4));
|
||||
}
|
||||
get visibleDecisions() {
|
||||
return this.decisionMoves.slice(
|
||||
Math.min(this.decisionPage, this.decisionPages - 1) * 4,
|
||||
(Math.min(this.decisionPage, this.decisionPages - 1) + 1) * 4
|
||||
);
|
||||
}
|
||||
get canAct() {
|
||||
return this.player != null && this.state.currentPlayers.includes(this.player);
|
||||
}
|
||||
get holdings() {
|
||||
return this.state.players
|
||||
.map((p, i) => ({ p, i }))
|
||||
.filter(
|
||||
({ p, i }) =>
|
||||
(p.bankHolding || []).length ||
|
||||
(i === this.player && !!this.availableMoves[MoveName.LoadBankContainer])
|
||||
);
|
||||
}
|
||||
get canSail() {
|
||||
return (
|
||||
this.canAct &&
|
||||
!!this.availableMoves[MoveName.Sail] &&
|
||||
legalBankAction(this.state, this.player, { name: MoveName.Sail, data: ShipPosition.OffshoreBank })
|
||||
);
|
||||
}
|
||||
|
||||
get bank() {
|
||||
return this.state.offshoreBank;
|
||||
}
|
||||
get ownPlayer() {
|
||||
return this.player == null ? undefined : this.state.players[this.player];
|
||||
}
|
||||
get factoryCargo() {
|
||||
return (this.ownPlayer?.containersOnFactoryStore || []).map((c) => ({ ...c.piece, price: c.price }));
|
||||
}
|
||||
get warehouseCargo() {
|
||||
return (this.ownPlayer?.containersOnWarehouseStore || []).map((c) => ({ ...c.piece, price: c.price }));
|
||||
}
|
||||
get storeIds() {
|
||||
return [...this.factoryCargo, ...this.warehouseCargo].map((c) => c.id);
|
||||
}
|
||||
offer(type: BankAuctionType, lot: number) {
|
||||
return this.availableMoves[MoveName.CallBank]?.find((o) => o.type === type && o.lot === lot);
|
||||
return this.canAct && this.availableMoves[MoveName.CallBank]?.some((o) => o.type === type && o.lot === lot);
|
||||
}
|
||||
chooseOffer(type: BankAuctionType, lot: number) {
|
||||
if (!this.offer(type, lot)) return;
|
||||
this.selectedOffer = { type, lot };
|
||||
this.selectedIds = [];
|
||||
this.cashBid = (this.auction(type, lot)?.cash || 0) + 1;
|
||||
}
|
||||
toggleContainer(id: string) {
|
||||
if (!this.storeIds.some((storeId) => storeId === id)) return;
|
||||
this.selectedIds = this.selectedIds.includes(id)
|
||||
? this.selectedIds.filter((c) => c !== id)
|
||||
: [...this.selectedIds, id];
|
||||
}
|
||||
get bidMove(): Moves.MoveCallBank | null {
|
||||
return this.selectedOffer
|
||||
? {
|
||||
name: MoveName.CallBank,
|
||||
data: this.selectedOffer,
|
||||
extraData:
|
||||
this.selectedOffer.type === 'cash' ? { containers: this.selectedIds } : { cash: this.cashBid },
|
||||
}
|
||||
: null;
|
||||
}
|
||||
get bidIsLegal() {
|
||||
return !!this.bidMove && legalBankAction(this.state, this.player, this.bidMove);
|
||||
}
|
||||
submitBid() {
|
||||
if (this.bidMove && this.bidIsLegal) this.emitMove(this.bidMove);
|
||||
if (this.offer(type, lot)) this.$emit('choose-offer', { type, lot });
|
||||
}
|
||||
emitMove(action: Move) {
|
||||
// Recheck against the current legal move set immediately before emitting.
|
||||
if (!this.availableMoves[action.name] || !legalBankAction(this.state, this.player, action)) return;
|
||||
this.$emit('move', action);
|
||||
this.resetDraft();
|
||||
}
|
||||
get decisionMoves(): Moves.MoveBankContainer[] {
|
||||
const names = [
|
||||
MoveName.ReturnBankContainer,
|
||||
MoveName.DistributeBankContainer,
|
||||
MoveName.SeizeBankContainer,
|
||||
] as const;
|
||||
return names.flatMap((name) => (this.availableMoves[name] || []).map((data) => ({ name, data })));
|
||||
if (!this.canAct) return [];
|
||||
return (
|
||||
[MoveName.ReturnBankContainer, MoveName.DistributeBankContainer, MoveName.SeizeBankContainer] as const
|
||||
).flatMap((name) => (this.availableMoves[name] || []).map((data) => ({ name, data })));
|
||||
}
|
||||
get pendingCargo() {
|
||||
const decision = this.bank?.decision;
|
||||
return decision?.kind === 'return'
|
||||
? decision.containers.map((c) => ({ ...c.container.piece, price: c.container.price }))
|
||||
: decision?.payment || [];
|
||||
const d = this.bank?.decision;
|
||||
return d?.kind === 'return'
|
||||
? d.containers.map((c) => ({ ...c.container.piece, price: c.container.price }))
|
||||
: d?.payment || [];
|
||||
}
|
||||
get decisionTitle() {
|
||||
return this.bank?.decision?.kind === 'return'
|
||||
? 'Outbid containers'
|
||||
? 'Outbid'
|
||||
: this.bank?.decision?.kind === 'seize'
|
||||
? 'Loan default'
|
||||
: 'Distribute bank payment';
|
||||
: 'Pay bank';
|
||||
}
|
||||
returnPrices(choice: Moves.MoveBankContainer) {
|
||||
return [1, 2, 3, 4, 5, 6].filter((price) =>
|
||||
|
|
@ -317,215 +267,39 @@ export default class OffshoreBank extends Vue {
|
|||
const lots = [0, 1, 2].filter((i) => !this.bank?.auctions.some((a) => a.type === 'containers' && a.lot === i));
|
||||
return lots[(this.bank?.decision?.cursor || 0) % lots.length];
|
||||
}
|
||||
get canSailToBank() {
|
||||
return this.availableMoves[MoveName.Sail]?.includes(ShipPosition.OffshoreBank);
|
||||
}
|
||||
get canLeaveBank() {
|
||||
return (
|
||||
this.ownPlayer?.ship.shipPosition === ShipPosition.OffshoreBank &&
|
||||
this.availableMoves[MoveName.Sail]?.includes(ShipPosition.OpenSea)
|
||||
);
|
||||
}
|
||||
owner(index: number) {
|
||||
return this.state.players[index]?.name || String(index + 1);
|
||||
}
|
||||
playerLabel(index: number) {
|
||||
const name = this.owner(index);
|
||||
return name.length > 10 ? name.slice(0, 9) + '…' : name;
|
||||
}
|
||||
auction(type: BankAuctionType, lot: number) {
|
||||
return this.bank?.auctions.find((a) => a.type === type && a.lot === lot);
|
||||
}
|
||||
escrow(auction: BankAuction) {
|
||||
return auction.containers.map((c) => ({ ...c.container.piece, price: c.container.price }));
|
||||
}
|
||||
loadContainer(id: string) {
|
||||
const piece = this.availableMoves[MoveName.LoadBankContainer]?.find((c) => c.id === id);
|
||||
if (piece) this.emitMove({ name: MoveName.LoadBankContainer, data: piece });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.offshore-bank {
|
||||
font: 14px/1.4 system-ui, sans-serif;
|
||||
box-sizing: border-box;
|
||||
width: min(1250px, 100%);
|
||||
margin: 14px auto;
|
||||
padding: 18px;
|
||||
background: #f6f4e9;
|
||||
border: 1px solid #8ca9aa;
|
||||
border-top: 4px solid #315f66;
|
||||
border-radius: 10px;
|
||||
color: #203a45;
|
||||
box-shadow: 0 4px 14px #203a4510;
|
||||
}
|
||||
.offshore-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.bank-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
color: #526d70;
|
||||
font-size: 12px;
|
||||
}
|
||||
.bank-toggle {
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.offshore-header h2 {
|
||||
margin: 3px 0 0;
|
||||
font-size: 23px;
|
||||
}
|
||||
.offshore-header p {
|
||||
font-size: 13px;
|
||||
color: #526d70;
|
||||
}
|
||||
.offshore-eyebrow {
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.13em;
|
||||
color: #63786e;
|
||||
}
|
||||
.offshore-lots {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
.offshore-lot {
|
||||
border: 1px solid #c4d0c8;
|
||||
border-radius: 7px;
|
||||
padding: 12px;
|
||||
background: #ffffffa8;
|
||||
min-width: 0;
|
||||
}
|
||||
h3 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.offshore-lot h3 strong {
|
||||
float: right;
|
||||
color: #315f66;
|
||||
font-size: 18px;
|
||||
}
|
||||
.offshore-escrow {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.offshore-escrow .offshore-cargo {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.offshore-muted {
|
||||
color: #586c6b;
|
||||
font-size: 12px;
|
||||
}
|
||||
.offshore-holdings {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
gap: 8px;
|
||||
margin-top: 14px;
|
||||
}
|
||||
.offshore-holding {
|
||||
border: 1px dashed #adbfbb;
|
||||
border-radius: 6px;
|
||||
padding: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
.offshore-holding.own {
|
||||
background: #e6eee3;
|
||||
border-style: solid;
|
||||
}
|
||||
.offshore-holding .offshore-cargo {
|
||||
margin: 5px 0;
|
||||
}
|
||||
.offshore-docked {
|
||||
margin: 8px 0 0;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #315f66;
|
||||
}
|
||||
.bank-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
margin: 7px 5px 0 0;
|
||||
padding: 8px 12px;
|
||||
min-height: 36px;
|
||||
border: 1px solid #74938e;
|
||||
border-radius: 5px;
|
||||
background: #fffdf5;
|
||||
color: #254d4b;
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
.offshore-lot.legal {
|
||||
stroke: #1b6c87;
|
||||
stroke-width: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
.bank-button.primary {
|
||||
background: #315f66;
|
||||
color: white;
|
||||
.offshore-lot[role='button']:hover,
|
||||
.offshore-lot[role='button']:focus-visible,
|
||||
[role='button']:focus-visible > rect {
|
||||
stroke: blue;
|
||||
stroke-width: 2;
|
||||
outline: none;
|
||||
}
|
||||
.bank-button:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.bank-button:focus-visible,
|
||||
input:focus-visible {
|
||||
outline: 3px solid #af742c;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.bank-button:hover:not(:disabled) {
|
||||
box-shadow: inset 0 0 0 1px currentColor;
|
||||
}
|
||||
.bank-decision {
|
||||
margin-top: 12px;
|
||||
padding: 14px;
|
||||
border: 2px solid #af8a48;
|
||||
border-radius: 7px;
|
||||
background: #fffae9;
|
||||
}
|
||||
.bank-decision p {
|
||||
font-size: 13px;
|
||||
}
|
||||
.bank-decision h4 {
|
||||
margin: 10px 0 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.bank-decision input {
|
||||
width: 90px;
|
||||
margin: 0 10px;
|
||||
padding: 7px;
|
||||
border: 1px solid #74938e;
|
||||
border-radius: 4px;
|
||||
font: inherit;
|
||||
}
|
||||
.bank-choice {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin: 6px 0;
|
||||
}
|
||||
.bank-hint {
|
||||
color: #765a2c;
|
||||
}
|
||||
.bank-navigation {
|
||||
margin-top: 8px;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.offshore-bank {
|
||||
padding: 12px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
.offshore-header {
|
||||
display: block;
|
||||
}
|
||||
.offshore-header p {
|
||||
margin: 5px 0;
|
||||
}
|
||||
.offshore-lots {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
.offshore-lot {
|
||||
padding: 9px;
|
||||
}
|
||||
.offshore-holdings {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
[role='button'] {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,81 +1,114 @@
|
|||
<template>
|
||||
<div class="offshore-cargo">
|
||||
<template v-for="piece in pieces">
|
||||
<button
|
||||
v-if="selectable.includes(piece.id)"
|
||||
<g class="offshore-cargo">
|
||||
<g
|
||||
v-for="(piece, i) in visiblePieces"
|
||||
:key="piece.id"
|
||||
type="button"
|
||||
class="offshore-cargo-piece"
|
||||
:class="{ selected: selected.includes(piece.id) }"
|
||||
:aria-pressed="selected.includes(piece.id) ? 'true' : 'false'"
|
||||
:transform="`translate(${(i % columns) * 23},${Math.floor(i / columns) * 13})`"
|
||||
:class="{ selectable: selectable.includes(piece.id), selected: selected.includes(piece.id) }"
|
||||
:role="selectable.includes(piece.id) ? 'button' : undefined"
|
||||
:tabindex="selectable.includes(piece.id) ? 0 : undefined"
|
||||
:aria-pressed="selectable.includes(piece.id) ? (selected.includes(piece.id) ? 'true' : 'false') : undefined"
|
||||
:aria-label="cargoLabel(piece)"
|
||||
:data-piece-id="piece.id"
|
||||
:title="colourName(piece.color)"
|
||||
@click="$emit('select', piece.id)"
|
||||
@click="selectPiece($event, piece.id)"
|
||||
@keydown.enter.prevent.stop="selectable.includes(piece.id) && $emit('select', piece.id)"
|
||||
@keydown.space.prevent.stop="selectable.includes(piece.id) && $emit('select', piece.id)"
|
||||
>
|
||||
<span v-html="badge(piece.color)"></span>
|
||||
<span>{{ colourName(piece.color) }}</span>
|
||||
<small v-if="piece.price != null">${{ piece.price }}</small>
|
||||
</button>
|
||||
<span v-else :key="piece.id" class="offshore-cargo-piece" :title="colourName(piece.color)">
|
||||
<span v-html="badge(piece.color)"></span>
|
||||
<span>{{ colourName(piece.color) }}</span>
|
||||
<small v-if="piece.price != null">${{ piece.price }}</small>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
<rect
|
||||
x="-1"
|
||||
y="-1"
|
||||
width="22"
|
||||
height="12"
|
||||
rx="1"
|
||||
fill="none"
|
||||
:stroke="selected.includes(piece.id) ? 'blue' : 'transparent'"
|
||||
stroke-width="2"
|
||||
/>
|
||||
<rect width="20" height="10" rx=".8" :fill="piece.color" stroke="#21343b" />
|
||||
<path d="M4 2V8 M8 2V8 M12 2V8 M16 2V8" stroke="#10252b" stroke-opacity=".3" stroke-width=".7" />
|
||||
<path d="M1 1H19" stroke="white" stroke-opacity=".5" />
|
||||
<ColorMark :color="piece.color" transform="translate(10 5) scale(.8)" />
|
||||
<title>{{ cargoLabel(piece) }}</title>
|
||||
</g>
|
||||
<g v-if="pages > 1" :transform="`translate(0 ${rows * 13 + 3})`">
|
||||
<g
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-label="Previous cargo page"
|
||||
@click.stop="page = (currentPage + pages - 1) % pages"
|
||||
@keydown.enter.prevent.stop="page = (currentPage + pages - 1) % pages"
|
||||
@keydown.space.prevent.stop="page = (currentPage + pages - 1) % pages"
|
||||
>
|
||||
<rect width="20" height="16" fill="#c6c6b8" /><text x="10" y="12" text-anchor="middle" font-size="12"
|
||||
>‹</text
|
||||
>
|
||||
</g>
|
||||
<text x="23" y="12" font-size="8">{{ currentPage + 1 }}/{{ pages }}</text>
|
||||
<g
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-label="Next cargo page"
|
||||
:transform="`translate(${columns * 23 - 22} 0)`"
|
||||
@click.stop="page = (currentPage + 1) % pages"
|
||||
@keydown.enter.prevent.stop="page = (currentPage + 1) % pages"
|
||||
@keydown.space.prevent.stop="page = (currentPage + 1) % pages"
|
||||
>
|
||||
<rect width="20" height="16" fill="#c6c6b8" /><text x="10" y="12" text-anchor="middle" font-size="12"
|
||||
>›</text
|
||||
>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { ContainerPiece } from 'container-engine/src/gamestate';
|
||||
import { colorBadgeHtml } from '../color-blind';
|
||||
import ColorMark from './ColorMark.vue';
|
||||
|
||||
/** Cargo outside the classic board: real piece IDs are preserved for escrow and loading choices. */
|
||||
@Component
|
||||
@Component({ components: { ColorMark } })
|
||||
export default class OffshoreCargo extends Vue {
|
||||
@Prop({ default: () => [] }) pieces!: Array<ContainerPiece & { price?: number }>;
|
||||
@Prop({ default: () => [] }) selectable!: string[];
|
||||
@Prop({ default: () => [] }) selected!: string[];
|
||||
@Prop({ default: false }) colorBlind!: boolean;
|
||||
@Prop({ default: 3 }) columns!: number;
|
||||
|
||||
badge(color: string) {
|
||||
return colorBadgeHtml(color, this.colorBlind);
|
||||
@Prop({ default: 2 }) rows!: number;
|
||||
page = 0;
|
||||
get pages() {
|
||||
return Math.max(1, Math.ceil(this.pieces.length / (this.columns * this.rows)));
|
||||
}
|
||||
get currentPage() {
|
||||
return Math.min(this.page, this.pages - 1);
|
||||
}
|
||||
get visiblePieces() {
|
||||
return this.pieces.slice(
|
||||
this.currentPage * this.columns * this.rows,
|
||||
(this.currentPage + 1) * this.columns * this.rows
|
||||
);
|
||||
}
|
||||
|
||||
colourName(color: string) {
|
||||
return color === 'darkslategray' ? 'dark green' : color;
|
||||
selectPiece(event: Event, id: string) {
|
||||
if (!this.selectable.includes(id)) return;
|
||||
event.stopPropagation();
|
||||
this.$emit('select', id);
|
||||
}
|
||||
cargoLabel(piece: ContainerPiece & { price?: number }) {
|
||||
return `${piece.color === 'darkslategray' ? 'dark green' : piece.color} container${
|
||||
piece.price == null ? '' : ': $' + piece.price
|
||||
}`;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.offshore-cargo {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
min-width: 0;
|
||||
}
|
||||
.offshore-cargo-piece {
|
||||
display: inline-flex;
|
||||
gap: 5px;
|
||||
align-items: center;
|
||||
padding: 5px 7px;
|
||||
border: 1px solid #b7c9ca;
|
||||
border-radius: 5px;
|
||||
background: #fffdf5;
|
||||
color: #203a45;
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
}
|
||||
button.offshore-cargo-piece {
|
||||
.selectable {
|
||||
cursor: pointer;
|
||||
min-height: 36px;
|
||||
}
|
||||
button.offshore-cargo-piece:hover,
|
||||
button.offshore-cargo-piece.selected {
|
||||
background: #dfeddf;
|
||||
border-color: #37655a;
|
||||
}
|
||||
button.offshore-cargo-piece:focus-visible {
|
||||
outline: 3px solid #af742c;
|
||||
.selectable:focus-visible {
|
||||
outline: 2px solid blue;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.selectable:hover > rect:first-child,
|
||||
.selected > rect:first-child {
|
||||
stroke: blue;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Fortryd mit træk",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Zug zurücknehmen",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Αναίρεση κίνησης",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Undo my move",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "بازگرداندن حرکت",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -637,11 +637,11 @@
|
|||
"The bank seizes {p0} from {p1}'s warehouses": "La banque saisit un conteneur {p0} des entrepôts de {p1}",
|
||||
"The bank seizes {p0} from {p1}'s warehouses and {p2} from {p3}'s factory": "La banque saisit un conteneur {p0} des entrepôts de {p1} et un conteneur {p2} de l'usine de {p3}",
|
||||
"The bank seizes {p0} from {p1}": "La banque saisit {p0} à {p1}",
|
||||
"brown container": "conteneur (marron)",
|
||||
"orange container": "conteneur (orange)",
|
||||
"tan container": "conteneur (beige)",
|
||||
"white container": "conteneur (blanc)",
|
||||
"dark green container": "conteneur (vert foncé)",
|
||||
"brown container": "Conteneur marron",
|
||||
"orange container": "Conteneur orange",
|
||||
"tan container": "Conteneur beige",
|
||||
"white container": "Conteneur blanc",
|
||||
"dark green container": "Conteneur vert foncé",
|
||||
"brown factory": "usine (marron)",
|
||||
"orange factory": "usine (orange)",
|
||||
"tan factory": "usine (beige)",
|
||||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Annuler mon coup",
|
||||
"Call Bank": "Appeler la banque",
|
||||
"Cash bid": "Enchère en argent",
|
||||
"Cash in escrow": "Argent consigné",
|
||||
"Cash is placed in public escrow until outbid or collected.": "L’argent est consigné publiquement jusqu’à une surenchère ou au règlement.",
|
||||
"Cash lot": "Lot d’argent",
|
||||
"Choose a container to cover unpaid interest.": "Choisissez un conteneur pour couvrir les intérêts impayés.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Le prochain conteneur va au lot",
|
||||
"No public bid": "Aucune enchère publique",
|
||||
"OPTIONAL EXPANSION": "EXTENSION FACULTATIVE",
|
||||
"Offshore Island": "Île offshore",
|
||||
"Offshore bank harbor": "Port de la banque offshore",
|
||||
"Outbid containers": "Conteneurs d’une offre dépassée",
|
||||
"Place public bid": "Placer une enchère publique",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Magasin d’entrepôt",
|
||||
"· You": "· Vous",
|
||||
"Containers on Ship and in Holding ($3 each)": "Conteneurs sur le navire et en attente (3 $ chacun)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Faites votre choix bancaire dans le panneau Île offshore.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} appelle la banque pour le lot d’argent {p1} : {p2} conteneurs consignés.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} appelle la banque pour le lot de conteneurs {p1} : {p2} $ consignés.",
|
||||
"{p0} sails to the offshore bank.": "{p0} navigue vers la banque offshore.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} répartit un conteneur {p1} à la banque.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} saisit un conteneur {p1} pour les intérêts impayés.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} charge un conteneur {p1} depuis la zone d’attente.",
|
||||
"Public auctions": "Enchères publiques",
|
||||
"Your holding": "Vos conteneurs en attente",
|
||||
"Show bank": "Afficher la banque",
|
||||
"Hide bank": "Masquer la banque",
|
||||
"Awaiting bank choice": "En attente d’un choix bancaire"
|
||||
"Awaiting bank choice": "En attente d’un choix bancaire",
|
||||
"Bank": "Banque",
|
||||
"OFFSHORE BANK": "BANQUE OFFSHORE",
|
||||
"BANK HARBOR": "PORT BANCAIRE",
|
||||
"Sail to bank": "Vers la banque",
|
||||
"Offer cargo": "Offre de conteneurs",
|
||||
"Offer cash": "Offre en argent",
|
||||
"Offer cargo · Lot {p0}": "Conteneurs · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Argent · Lot {p0}",
|
||||
"Confirm offer": "Confirmer",
|
||||
"Invalid offer": "Offre invalide",
|
||||
"Outbid": "Offre dépassée",
|
||||
"Pay bank": "Payer la banque",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "Suite {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Lot d’argent {p0} : {p1} $",
|
||||
"Container lot {p0}: {p1} containers": "Lot de conteneurs {p0} : {p1} conteneurs",
|
||||
"Cash lot {p0}": "Lot d’argent {p0}",
|
||||
"Container lot {p0}": "Lot de conteneurs {p0}",
|
||||
"Previous cargo page": "Page de conteneurs précédente",
|
||||
"Next cargo page": "Page de conteneurs suivante",
|
||||
"Return at ${p0}": "Rendre à {p0} $",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Offre en argent : saisir les chiffres, Retour arrière pour effacer, Entrée pour enchérir",
|
||||
"Choose a bank action.": "Choisissez une action bancaire.",
|
||||
"brown container: ${p0}": "Conteneur marron : {p0} $",
|
||||
"orange container: ${p0}": "Conteneur orange : {p0} $",
|
||||
"tan container: ${p0}": "Conteneur beige : {p0} $",
|
||||
"white container: ${p0}": "Conteneur blanc : {p0} $",
|
||||
"dark green container: ${p0}": "Conteneur vert foncé : {p0} $"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "अपनी चाल वापस लें",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Annulla la mossa",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "내 수 되돌리기",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Zet ongedaan maken",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Cofnij ruch",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Desfazer jogada",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Anulează mutarea",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Отменить ход",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "Hoàn tác nước đi",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Change bid": "更改出价",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,7 +656,6 @@
|
|||
"Undo my move": "撤回我的行動",
|
||||
"Call Bank": "Call Bank",
|
||||
"Cash bid": "Cash bid",
|
||||
"Cash in escrow": "Cash in escrow",
|
||||
"Cash is placed in public escrow until outbid or collected.": "Cash is placed in public escrow until outbid or collected.",
|
||||
"Cash lot": "Cash lot",
|
||||
"Choose a container to cover unpaid interest.": "Choose a container to cover unpaid interest.",
|
||||
|
|
@ -674,7 +673,6 @@
|
|||
"Next container goes to lot": "Next container goes to lot",
|
||||
"No public bid": "No public bid",
|
||||
"OPTIONAL EXPANSION": "OPTIONAL EXPANSION",
|
||||
"Offshore Island": "Offshore Island",
|
||||
"Offshore bank harbor": "Offshore bank harbor",
|
||||
"Outbid containers": "Outbid containers",
|
||||
"Place public bid": "Place public bid",
|
||||
|
|
@ -688,7 +686,6 @@
|
|||
"Warehouse store": "Warehouse store",
|
||||
"· You": "· You",
|
||||
"Containers on Ship and in Holding ($3 each)": "Containers on Ship and in Holding ($3 each)",
|
||||
"Choose your bank decision in the Offshore Island panel.": "Choose your bank decision in the Offshore Island panel.",
|
||||
"{p0} calls bank for cash lot {p1}: {p2} containers in escrow.": "{p0} calls bank for cash lot {p1}: {p2} containers in escrow.",
|
||||
"{p0} calls bank for container lot {p1}: ${p2} in escrow.": "{p0} calls bank for container lot {p1}: ${p2} in escrow.",
|
||||
"{p0} sails to the offshore bank.": "{p0} sails to the offshore bank.",
|
||||
|
|
@ -696,9 +693,33 @@
|
|||
"{p0} distributes a {p1} container to the bank.": "{p0} distributes a {p1} container to the bank.",
|
||||
"{p0} seizes a {p1} container for unpaid interest.": "{p0} seizes a {p1} container for unpaid interest.",
|
||||
"{p0} loads a {p1} container from the holding area.": "{p0} loads a {p1} container from the holding area.",
|
||||
"Public auctions": "Public auctions",
|
||||
"Your holding": "Your holding",
|
||||
"Show bank": "Show bank",
|
||||
"Hide bank": "Hide bank",
|
||||
"Awaiting bank choice": "Awaiting bank choice"
|
||||
"Awaiting bank choice": "Awaiting bank choice",
|
||||
"Bank": "Bank",
|
||||
"OFFSHORE BANK": "OFFSHORE BANK",
|
||||
"BANK HARBOR": "BANK HARBOR",
|
||||
"Sail to bank": "Sail to bank",
|
||||
"Offer cargo": "Offer cargo",
|
||||
"Offer cash": "Offer cash",
|
||||
"Offer cargo · Lot {p0}": "Offer cargo · Lot {p0}",
|
||||
"Offer cash · Lot {p0}": "Offer cash · Lot {p0}",
|
||||
"Confirm offer": "Confirm offer",
|
||||
"Invalid offer": "Invalid offer",
|
||||
"Outbid": "Outbid",
|
||||
"Pay bank": "Pay bank",
|
||||
"Lot {p0}": "Lot {p0}",
|
||||
"More {p0}/{p1}": "More {p0}/{p1}",
|
||||
"Cash lot {p0}: ${p1}": "Cash lot {p0}: ${p1}",
|
||||
"Container lot {p0}: {p1} containers": "Container lot {p0}: {p1} containers",
|
||||
"Cash lot {p0}": "Cash lot {p0}",
|
||||
"Container lot {p0}": "Container lot {p0}",
|
||||
"Previous cargo page": "Previous cargo page",
|
||||
"Next cargo page": "Next cargo page",
|
||||
"Return at ${p0}": "Return at ${p0}",
|
||||
"Cash offer: type digits, Backspace to delete, Enter to bid": "Cash offer: type digits, Backspace to delete, Enter to bid",
|
||||
"Choose a bank action.": "Choose a bank action.",
|
||||
"brown container: ${p0}": "brown container: ${p0}",
|
||||
"orange container: ${p0}": "orange container: ${p0}",
|
||||
"tan container: ${p0}": "tan container: ${p0}",
|
||||
"white container: ${p0}": "white container: ${p0}",
|
||||
"dark green container: ${p0}": "dark green container: ${p0}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ export enum DropZoneType {
|
|||
WarehouseStore = 'warehouseStore',
|
||||
OpenSea = 'openSea',
|
||||
IslandHarbor = 'islandHarbor',
|
||||
OffshoreBank = 'offshoreBank',
|
||||
GetLoan = 'getLoan',
|
||||
PayLoan = 'payLoan',
|
||||
Supply = 'supply',
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
import Calculator from '@/components/Calculator.vue';
|
||||
import Game from '@/components/Game.vue';
|
||||
import OffshoreBank from '@/components/OffshoreBank.vue';
|
||||
import OffshoreCargo from '@/components/OffshoreCargo.vue';
|
||||
import { legalBankAction } from '@/offshore-actions';
|
||||
import { escapeJournal, offshoreJournal } from '@/offshore-journal';
|
||||
import { mount, shallowMount } from '@vue/test-utils';
|
||||
import { expect } from 'chai';
|
||||
import { availableMoves, MoveName, setup } from 'container-engine';
|
||||
import { Phase, ShipPosition } from 'container-engine/src/gamestate';
|
||||
import { EventEmitter } from 'events';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
function fixture() {
|
||||
const state = setup(3, { offshoreIsland: true }, 'offshore-viewer');
|
||||
|
|
@ -21,7 +23,10 @@ function fixture() {
|
|||
const refresh = () => (own.availableMoves = availableMoves(state, own));
|
||||
refresh();
|
||||
const render = () =>
|
||||
mount(OffshoreBank, { propsData: { state, player, availableMoves: own.availableMoves, colorBlind: true } });
|
||||
mount(OffshoreBank, {
|
||||
provide: { __reactiveInject__: { preferences: { colorBlind: true } } },
|
||||
propsData: { state, player, availableMoves: own.availableMoves, colorBlind: true },
|
||||
});
|
||||
return { state, player, own, factory, warehouse, refresh, render };
|
||||
}
|
||||
|
||||
|
|
@ -39,8 +44,8 @@ describe('Offshore bank viewer', () => {
|
|||
},
|
||||
state
|
||||
)!;
|
||||
expect(text).to.equal('<Ada> calls bank for container lot 3: $4 in escrow.');
|
||||
expect(escapeJournal(text)).to.contain('<Ada>');
|
||||
expect(text).toBe('<Ada> calls bank for container lot 3: $4 in escrow.');
|
||||
expect(escapeJournal(text)).toContain('<Ada>');
|
||||
});
|
||||
it('keeps classic games free of the expansion panel', () => {
|
||||
const state = setup(3, {}, 'classic-viewer');
|
||||
|
|
@ -52,51 +57,109 @@ describe('Offshore bank viewer', () => {
|
|||
preferences: { sound: false },
|
||||
},
|
||||
});
|
||||
expect(wrapper.findComponent(OffshoreBank).exists()).to.equal(false);
|
||||
expect(wrapper.findComponent(OffshoreBank).exists()).toBe(false);
|
||||
wrapper.destroy();
|
||||
});
|
||||
|
||||
it('shows three lots of each kind and submits a real engine-legal cash bid', async () => {
|
||||
const { render, state, player } = fixture();
|
||||
it('selects the exact type and lot through all six SVG lots', async () => {
|
||||
const { render } = fixture();
|
||||
const wrapper = render();
|
||||
expect(wrapper.findAll('.offshore-lot').length).to.equal(6);
|
||||
await wrapper.findAll('.offshore-lot').at(3).find('button').trigger('click');
|
||||
await wrapper.find('input').setValue('2');
|
||||
const before = JSON.stringify(state);
|
||||
await wrapper.find('form').trigger('submit');
|
||||
const action = wrapper.emitted('move')![0][0];
|
||||
expect(action).to.deep.equal({
|
||||
expect(wrapper.findAll('.offshore-lot').length).toBe(6);
|
||||
for (const type of ['cash', 'containers'])
|
||||
for (let lot = 0; lot < 3; lot++) {
|
||||
await wrapper.find(`[data-type="${type}"][data-lot="${lot}"]`).trigger('click');
|
||||
expect(wrapper.emitted('choose-offer')!.slice(-1)[0][0]).toEqual({ type, lot });
|
||||
}
|
||||
wrapper.destroy();
|
||||
});
|
||||
|
||||
function gameFixture() {
|
||||
const f = fixture();
|
||||
const emitter = new EventEmitter();
|
||||
const submitted: any[] = [];
|
||||
emitter.on('move', (moves) => submitted.push(moves));
|
||||
const wrapper = shallowMount(Game, {
|
||||
propsData: { state: f.state, player: f.player, emitter, preferences: { sound: false } },
|
||||
});
|
||||
return { ...f, wrapper, submitted };
|
||||
}
|
||||
|
||||
it('uses the selected cash-price lot, rejects invalid bids and clears stale drafts', async () => {
|
||||
const { wrapper, own, submitted, state } = gameFixture();
|
||||
wrapper.findComponent(OffshoreBank).vm.$emit('choose-offer', { type: 'containers', lot: 2 });
|
||||
await wrapper.vm.$nextTick();
|
||||
wrapper.findComponent(Calculator).vm.$emit('bid', own.money + 1);
|
||||
await wrapper.vm.$nextTick();
|
||||
expect(submitted.length).toBe(0);
|
||||
expect(wrapper.find('.bank-draft').text()).toContain('Invalid offer');
|
||||
wrapper.findComponent(Calculator).vm.$emit('bid', 2);
|
||||
await wrapper.vm.$nextTick();
|
||||
expect(submitted[0].slice(-1)[0]).toEqual({
|
||||
name: MoveName.CallBank,
|
||||
data: { type: 'containers', lot: 0 },
|
||||
data: { type: 'containers', lot: 2 },
|
||||
extraData: { cash: 2 },
|
||||
});
|
||||
expect(legalBankAction(state, player, action)).to.equal(true);
|
||||
expect(JSON.stringify(state)).to.equal(before);
|
||||
expect(wrapper.find('.bank-draft').exists()).toBe(false);
|
||||
await wrapper.setProps({ state: JSON.parse(JSON.stringify(state)) });
|
||||
wrapper.findComponent(OffshoreBank).vm.$emit('choose-offer', { type: 'cash', lot: 1 });
|
||||
await wrapper.vm.$nextTick();
|
||||
await wrapper.setProps({ player: undefined });
|
||||
expect(wrapper.find('.bank-draft').exists()).toBe(false);
|
||||
wrapper.destroy();
|
||||
});
|
||||
|
||||
it('selects specific factory and warehouse pieces for a cargo bid and rejects empty bids', async () => {
|
||||
const { render, factory, warehouse } = fixture();
|
||||
const wrapper = render();
|
||||
await wrapper.find('.offshore-lot button').trigger('click');
|
||||
expect(wrapper.find('button[type="submit"]').attributes('disabled')).to.equal('disabled');
|
||||
await wrapper.find(`form [data-piece-id="${factory.id}"]`).trigger('click');
|
||||
await wrapper.find(`form [data-piece-id="${warehouse.id}"]`).trigger('click');
|
||||
await wrapper.find('form').trigger('submit');
|
||||
expect(wrapper.emitted('move')![0][0].extraData.containers).to.deep.equal([factory.id, warehouse.id]);
|
||||
it('requires explicit confirmation for multiple cargo pieces and supports cancel', async () => {
|
||||
const { wrapper, submitted, factory, warehouse } = gameFixture();
|
||||
wrapper.findComponent(OffshoreBank).vm.$emit('choose-offer', { type: 'cash', lot: 1 });
|
||||
await wrapper.vm.$nextTick();
|
||||
const cargo = wrapper.find('.bank-draft').findComponent(OffshoreCargo);
|
||||
cargo.vm.$emit('select', factory.id);
|
||||
cargo.vm.$emit('select', warehouse.id);
|
||||
await wrapper.vm.$nextTick();
|
||||
expect(submitted.length).toBe(0);
|
||||
const buttons = wrapper.find('.bank-draft').findAllComponents({ name: 'Button' });
|
||||
buttons.at(0).vm.$emit('click');
|
||||
await wrapper.vm.$nextTick();
|
||||
expect(submitted[0].slice(-1)[0]).toEqual({
|
||||
name: MoveName.CallBank,
|
||||
data: { type: 'cash', lot: 1 },
|
||||
extraData: { containers: [factory.id, warehouse.id] },
|
||||
});
|
||||
wrapper.destroy();
|
||||
});
|
||||
|
||||
it('does not enable invalid cash bids or stale/spectator controls', async () => {
|
||||
const { render, own } = fixture();
|
||||
it('cancels a draft without submitting and paginates large cargo without losing access', async () => {
|
||||
const { wrapper, submitted } = gameFixture();
|
||||
wrapper.findComponent(OffshoreBank).vm.$emit('choose-offer', { type: 'cash', lot: 0 });
|
||||
await wrapper.vm.$nextTick();
|
||||
wrapper.find('.bank-draft').findAllComponents({ name: 'Button' }).at(1).vm.$emit('click');
|
||||
await wrapper.vm.$nextTick();
|
||||
expect(wrapper.find('.bank-draft').exists()).toBe(false);
|
||||
expect(submitted.length).toBe(0);
|
||||
wrapper.destroy();
|
||||
const pieces = Array.from({ length: 103 }, (_, i) => ({ id: `large-${i}`, color: 'orange' }));
|
||||
const cargo = mount(OffshoreCargo, {
|
||||
provide: { __reactiveInject__: { preferences: { colorBlind: true } } },
|
||||
propsData: { pieces, columns: 3, rows: 2 },
|
||||
});
|
||||
const seen = new Set<string>();
|
||||
for (let page = 0; page < 18; page++) {
|
||||
const visible = cargo.findAll('[data-piece-id]');
|
||||
expect(visible.length).toBeLessThanOrEqual(6);
|
||||
visible.wrappers.forEach((piece) => seen.add(String(piece.attributes('data-piece-id'))));
|
||||
await cargo.find('[aria-label="Next cargo page"]').trigger('keydown.enter');
|
||||
}
|
||||
expect(seen.size).toBe(103);
|
||||
cargo.destroy();
|
||||
});
|
||||
|
||||
it('spectators can inspect lots without mutation controls', async () => {
|
||||
const { render } = fixture();
|
||||
const wrapper = render();
|
||||
await wrapper.findAll('.offshore-lot').at(3).find('button').trigger('click');
|
||||
await wrapper.find('input').setValue(String(own.money + 1));
|
||||
await wrapper.find('form').trigger('submit');
|
||||
expect(wrapper.emitted('move')).to.equal(undefined);
|
||||
await wrapper.setProps({ availableMoves: {}, player: undefined });
|
||||
expect(wrapper.findAll('.offshore-lot button').length).to.equal(0);
|
||||
expect(wrapper.find('form').exists()).to.equal(false);
|
||||
await wrapper.setProps({ player: undefined });
|
||||
expect(wrapper.findAll('.offshore-lot[role="button"]').length).toBe(0);
|
||||
await wrapper.find('.offshore-lot').trigger('click');
|
||||
expect(wrapper.emitted('choose-offer')).toBe(undefined);
|
||||
wrapper.destroy();
|
||||
});
|
||||
|
||||
|
|
@ -118,10 +181,10 @@ describe('Offshore bank viewer', () => {
|
|||
refresh();
|
||||
const wrapper = render();
|
||||
const vm = wrapper.vm as any;
|
||||
expect(vm.returnPrices({ name: MoveName.ReturnBankContainer, data: factory })).to.deep.equal([1, 2, 3, 4]);
|
||||
expect(vm.returnPrices({ name: MoveName.ReturnBankContainer, data: warehouse })).to.deep.equal([2, 3, 4, 5, 6]);
|
||||
expect(wrapper.findAll('.bank-choice').length).to.equal(2);
|
||||
expect(wrapper.find('.offshore-holding.own .offshore-cargo-piece').exists()).to.equal(true);
|
||||
expect(vm.returnPrices({ name: MoveName.ReturnBankContainer, data: factory })).toEqual([1, 2, 3, 4]);
|
||||
expect(vm.returnPrices({ name: MoveName.ReturnBankContainer, data: warehouse })).toEqual([2, 3, 4, 5, 6]);
|
||||
expect(wrapper.findAll('.bank-choice').length).toBe(2);
|
||||
expect(wrapper.find('.bank-holding [data-piece-id]').exists()).toBe(true);
|
||||
wrapper.destroy();
|
||||
});
|
||||
|
||||
|
|
@ -140,9 +203,9 @@ describe('Offshore bank viewer', () => {
|
|||
};
|
||||
refresh();
|
||||
let wrapper = render();
|
||||
expect(wrapper.text()).to.contain('Loan default');
|
||||
await wrapper.find('.bank-choice button').trigger('click');
|
||||
expect(wrapper.emitted('move')![0][0].name).to.equal(MoveName.SeizeBankContainer);
|
||||
expect(wrapper.text()).toContain('Loan default');
|
||||
await wrapper.find('.bank-choice [role="button"]').trigger('click');
|
||||
expect(wrapper.emitted('move')![0][0].name).toBe(MoveName.SeizeBankContainer);
|
||||
wrapper.destroy();
|
||||
state.offshoreBank!.decision = {
|
||||
kind: 'distribute',
|
||||
|
|
@ -154,9 +217,37 @@ describe('Offshore bank viewer', () => {
|
|||
};
|
||||
refresh();
|
||||
wrapper = render();
|
||||
expect(wrapper.text()).to.contain('Next container goes to lot');
|
||||
await wrapper.find('.bank-choice button').trigger('click');
|
||||
expect(wrapper.emitted('move')![0][0].name).to.equal(MoveName.DistributeBankContainer);
|
||||
expect(wrapper.text()).toContain('Lot 1');
|
||||
await wrapper.find('.bank-choice [role="button"]').trigger('click');
|
||||
expect(wrapper.emitted('move')![0][0].name).toBe(MoveName.DistributeBankContainer);
|
||||
wrapper.destroy();
|
||||
});
|
||||
|
||||
it('paginates many bank decisions and retains legal choices on later pages', async () => {
|
||||
const { state, player, refresh, render } = fixture();
|
||||
state.phase = Phase.BankDecision;
|
||||
const containers = Array.from({ length: 11 }, () => ({
|
||||
container: { piece: state.containersLeft.pop()!, price: 2, moved: false },
|
||||
district: 'factory' as const,
|
||||
}));
|
||||
state.offshoreBank!.decision = {
|
||||
kind: 'return',
|
||||
player,
|
||||
resumePlayer: player,
|
||||
containers,
|
||||
payment: [],
|
||||
cursor: 0,
|
||||
};
|
||||
refresh();
|
||||
const wrapper = render();
|
||||
expect(wrapper.findAll('.bank-choice').length).toBe(4);
|
||||
await wrapper.find('[aria-label="More 1/3"]').trigger('click');
|
||||
expect(wrapper.findAll('.bank-choice').length).toBe(4);
|
||||
await wrapper.find('[aria-label="More 2/3"]').trigger('click');
|
||||
expect(wrapper.findAll('.bank-choice').length).toBe(3);
|
||||
await wrapper.find('.bank-choice [role="button"]').trigger('click');
|
||||
const action = wrapper.emitted('move')![0][0];
|
||||
expect(legalBankAction(state, player, action)).toBe(true);
|
||||
wrapper.destroy();
|
||||
});
|
||||
|
||||
|
|
@ -167,19 +258,19 @@ describe('Offshore bank viewer', () => {
|
|||
own.bankHolding!.push(state.containersLeft.pop()!);
|
||||
refresh();
|
||||
const wrapper = render();
|
||||
expect(wrapper.find('.offshore-holding.own button').text()).to.contain('Load onto ship');
|
||||
await wrapper.find('.offshore-holding.own button').trigger('click');
|
||||
expect(wrapper.emitted('move')![0][0].name).to.equal(MoveName.LoadBankContainer);
|
||||
expect(wrapper.find('.bank-holding [role="button"]').exists()).toBe(true);
|
||||
await wrapper.find('.bank-holding [role="button"]').trigger('click');
|
||||
expect(wrapper.emitted('move')![0][0].name).toBe(MoveName.LoadBankContainer);
|
||||
own.lastMove = null;
|
||||
refresh();
|
||||
await wrapper.setProps({ availableMoves: own.availableMoves });
|
||||
expect(wrapper.find('.offshore-holding.own button').exists()).to.equal(false);
|
||||
expect(wrapper.find('.bank-holding [role="button"]').exists()).toBe(false);
|
||||
wrapper.destroy();
|
||||
const game = shallowMount(Game, {
|
||||
propsData: { state, player, emitter: new EventEmitter(), preferences: { sound: false } },
|
||||
});
|
||||
const ship = (game.vm as any).ships.find((s) => s.owner === player);
|
||||
expect(Number.isFinite(ship.x) && Number.isFinite(ship.y)).to.equal(true);
|
||||
expect(Number.isFinite(ship.x) && Number.isFinite(ship.y)).toBe(true);
|
||||
game.destroy();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
11
viewer/tests/unit/setup.ts
Normal file
11
viewer/tests/unit/setup.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { afterEach } from 'vitest';
|
||||
import Vue from 'vue';
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
Vue.config.devtools = false;
|
||||
|
||||
// Vue Test Utils 1 does not remove nodes mounted with attachTo automatically.
|
||||
// Keep Vitest's jsdom instance isolated between test files and test cases.
|
||||
afterEach(() => {
|
||||
document.body.innerHTML = '';
|
||||
});
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"target": "es2020",
|
||||
"module": "esnext",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
"sourceMap": true,
|
||||
"resolveJsonModule": true,
|
||||
"baseUrl": ".",
|
||||
"types": ["webpack-env", "mocha", "chai", "node"],
|
||||
"types": ["vite/client", "vitest/globals", "chai", "node"],
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
},
|
||||
|
|
@ -21,6 +21,6 @@
|
|||
"skipLibCheck": true,
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"],
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx", "vite.config.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
|||
114
viewer/vite.config.ts
Normal file
114
viewer/vite.config.ts
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
import inject from '@rollup/plugin-inject';
|
||||
import vue from '@vitejs/plugin-vue2';
|
||||
import { readdirSync, readFileSync } from 'node:fs';
|
||||
import { createRequire } from 'node:module';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
const root = dirname(fileURLToPath(import.meta.url));
|
||||
const engine = resolve(root, '../engine');
|
||||
const localization = resolve(root, 'src/localization');
|
||||
const require = createRequire(import.meta.url);
|
||||
const browserAssert = require.resolve('assert/');
|
||||
|
||||
// These are external only for a UMD library build. Rollup cannot split UMD chunks,
|
||||
// so each locale is emitted as a small native ES module and imported lazily by the
|
||||
// classic-script entry. App and test builds use Vite's ordinary JSON transforms.
|
||||
const locales = readdirSync(localization)
|
||||
.filter((file) => file.endsWith('.json') && file !== 'en.json')
|
||||
.map((file) => file.slice(0, -'.json'.length));
|
||||
const localePath = (locale: string) => resolve(localization, `${locale}.json`);
|
||||
const localeForId = (id: string) => locales.find((locale) => id.split('?')[0] === localePath(locale));
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const library = mode === 'library' || mode === 'library-readable';
|
||||
const minify = mode !== 'library-readable';
|
||||
const suffix = minify ? '.min' : '';
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
vue(),
|
||||
{
|
||||
...inject({ process: 'process/browser', include: /node_modules\/.*\.js(?:\?.*)?$/ }),
|
||||
apply: 'build',
|
||||
enforce: 'post',
|
||||
},
|
||||
{
|
||||
name: 'container-locale-sidecars',
|
||||
apply: 'build',
|
||||
generateBundle() {
|
||||
if (!library) return;
|
||||
for (const locale of locales) {
|
||||
// JSON modules already have a default export. Keeping the original
|
||||
// bytes avoids escaping differences in non-Latin catalogues.
|
||||
this.emitFile({
|
||||
type: 'asset',
|
||||
fileName: `container-viewer.umd${suffix}.locale-${locale}.js`,
|
||||
source: `export default ${readFileSync(localePath(locale), 'utf8')};`,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: /^@\/(.*)/, replacement: `${resolve(root, 'src')}/$1` },
|
||||
// Compile the workspace engine source, not its separately built CommonJS
|
||||
// output. Subpaths need their own rule so they remain source imports too.
|
||||
{ find: /^container-engine$/, replacement: resolve(engine, 'index.ts') },
|
||||
{ find: /^container-engine\/(.*)/, replacement: `${engine}/$1` },
|
||||
// Vite externalizes Node's assert by default. The real browser package
|
||||
// preserves engine assertions without changing engine source.
|
||||
{ find: /^assert$/, replacement: browserAssert },
|
||||
],
|
||||
},
|
||||
define: {
|
||||
...(library ? { 'process.env.NODE_ENV': JSON.stringify('production') } : {}),
|
||||
// The local demo retains its old opt-in environment variable.
|
||||
'process.env.VUE_APP_loadGame': JSON.stringify(process.env.VUE_APP_loadGame) ?? 'undefined',
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 8080,
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
emptyOutDir: mode !== 'library-readable',
|
||||
copyPublicDir: !library,
|
||||
sourcemap: false,
|
||||
assetsInlineLimit: 10 * 1024 * 1024,
|
||||
minify,
|
||||
cssMinify: true,
|
||||
lib: library
|
||||
? {
|
||||
entry: resolve(root, 'src/wrapper.ts'),
|
||||
name: 'container-viewer',
|
||||
formats: ['umd'],
|
||||
cssFileName: 'container-viewer',
|
||||
fileName: () => `container-viewer.umd${suffix}.js`,
|
||||
}
|
||||
: undefined,
|
||||
rollupOptions: {
|
||||
external: library ? (id) => id === 'vue' || localeForId(id) !== undefined : undefined,
|
||||
output: library
|
||||
? {
|
||||
exports: 'named',
|
||||
globals: { vue: 'Vue' },
|
||||
paths: (id) => {
|
||||
const locale = localeForId(id);
|
||||
return locale ? `./container-viewer.umd${suffix}.locale-${locale}.js` : id;
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
},
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
globals: true,
|
||||
include: ['tests/unit/**/*.spec.ts'],
|
||||
setupFiles: ['tests/unit/setup.ts'],
|
||||
restoreMocks: true,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
// Small icons and sounds stay inline. Language chunks are uploaded with the entry and CSS.
|
||||
const INLINE_ASSETS_LIMIT = 10 * 1024 * 1024;
|
||||
|
||||
const { dirname, join } = require('path');
|
||||
const protocolDist = dirname(require.resolve('@boardgamers/protocol/viewer'));
|
||||
|
||||
module.exports = {
|
||||
productionSourceMap: false,
|
||||
transpileDependencies: ['@boardgamers/protocol', 'zod'],
|
||||
devServer: {
|
||||
// For gitpod, it needs to be disabled
|
||||
disableHostCheck: true,
|
||||
},
|
||||
chainWebpack: (config) => {
|
||||
if (config.plugins.has('fork-ts-checker')) {
|
||||
config.plugin('fork-ts-checker').tap((args) => {
|
||||
args[0].vue.compiler = 'vue-template-compiler';
|
||||
return args;
|
||||
});
|
||||
}
|
||||
// App and library builds use different Vue import transforms.
|
||||
for (const name of ['js', 'ts', 'tsx', 'vue']) {
|
||||
const rule = config.module.rule(name);
|
||||
if (rule.uses.has('cache-loader')) {
|
||||
rule.use('cache-loader').tap((options) => ({
|
||||
...options,
|
||||
cacheIdentifier: `${options.cacheIdentifier}:${process.env.VUE_CLI_BUILD_TARGET || 'app'}`,
|
||||
}));
|
||||
}
|
||||
}
|
||||
// Engine sources have their own tsconfig; every viewer worker must use
|
||||
// the Vue config, including its legacy-decorator setting.
|
||||
for (const name of ['ts', 'tsx']) {
|
||||
config.module
|
||||
.rule(name)
|
||||
.use('ts-loader')
|
||||
.tap((options) => ({
|
||||
...options,
|
||||
configFile: join(__dirname, 'tsconfig.json'),
|
||||
}));
|
||||
}
|
||||
// Webpack 4 predates package exports; resolve the published ESM entry points.
|
||||
config.resolve.alias.set('@boardgamers/protocol/player-symbols$', join(protocolDist, 'player-symbols.js'));
|
||||
config.resolve.alias.set('@boardgamers/protocol/viewer', join(protocolDist, 'viewer.js'));
|
||||
config.resolve.alias.set('@boardgamers/protocol/chat/dom$', join(protocolDist, 'chat-dom.js'));
|
||||
config.resolve.alias.set('@boardgamers/protocol/chat$', join(protocolDist, 'chat.js'));
|
||||
config.resolve.alias.set('@boardgamers/protocol/tutorial/dom$', join(protocolDist, 'tutorial-dom.js'));
|
||||
config.resolve.alias.set('@boardgamers/protocol/tutorial$', join(protocolDist, 'tutorial.js'));
|
||||
// vue-cli's svg rule uses plain file-loader (always emits files); replace it
|
||||
// with url-loader so the icons are inlined. Reuse the url-loader already
|
||||
// resolved for the images rule (it is not hoisted to our node_modules).
|
||||
const urlLoader = config.module.rule('images').use('url-loader').get('loader');
|
||||
config.module.rule('svg').uses.clear();
|
||||
config.module.rule('svg').use('url-loader').loader(urlLoader).options({ limit: INLINE_ASSETS_LIMIT });
|
||||
|
||||
// Raise the inline threshold so audio (and any raster images) inline too
|
||||
// instead of falling back to file-loader above 4 KiB.
|
||||
for (const ruleName of ['images', 'media']) {
|
||||
config.module
|
||||
.rule(ruleName)
|
||||
.use('url-loader')
|
||||
.tap((options) => ({ ...options, limit: INLINE_ASSETS_LIMIT }));
|
||||
}
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue