diff --git a/src/maps/portugal/lisboa.ts b/src/maps/portugal/lisboa.ts index bb9d2dcb..cb831f8d 100644 --- a/src/maps/portugal/lisboa.ts +++ b/src/maps/portugal/lisboa.ts @@ -117,7 +117,10 @@ export class PortugalMoveValidator extends MoveValidator { .flatMap((connection) => { const otherEnd = grid.get( connection.connects.find((c) => !location.coordinates.equals(c))!, - ) as City; + ); + if (!(otherEnd instanceof City)) { + return []; + } if ( (isLisboa(otherEnd) || otherEnd.name() === "Madeira") && (location.name() === "Sagres" || location.name() === "Sines") && @@ -146,7 +149,10 @@ export class PortugalMoveValidator extends MoveValidator { .flatMap((connection) => { const otherEnd = grid.get( connection.connects.find((c) => !location.coordinates.equals(c))!, - ) as Land; + ); + if (!(otherEnd instanceof Land)) { + return []; + } if ( (isLisboa(location) || location.name() === "Madeira") && (otherEnd.name() === "Sagres" || otherEnd.name() === "Sines") &&