board-game-engine 1.0.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8425,10 +8425,10 @@ function resolveProperty(bgioArguments, value2, context) {
8425
8425
  return get(bgioArguments.ctx, value2.path);
8426
8426
  } else if (value2?.type === "gamePath") {
8427
8427
  return get(bgioArguments.G, value2.path);
8428
- } else if (value2?.type === "RelativePath") {
8428
+ } else if (value2?.type === "relativePath" || value2?.type === "RelativePath") {
8429
8429
  const target = resolveProperties(bgioArguments, value2.target, context, "target");
8430
8430
  return get(target.attributes, value2.path) ?? null;
8431
- } else if (value2?.type === "Parent") {
8431
+ } else if (value2?.type === "parent" || value2?.type === "Parent") {
8432
8432
  const originalTarget = value2.target ? resolveProperties(bgioArguments, value2.target, context, "target") : context.originalTarget;
8433
8433
  return bgioArguments.G.bank.findParent(originalTarget) ?? null;
8434
8434
  } else if (value2?.type === "map") {
@@ -8458,7 +8458,7 @@ function resolveProperty(bgioArguments, value2, context) {
8458
8458
  }
8459
8459
  }
8460
8460
  return maxTargets;
8461
- } else if (value2?.type === "Pick") {
8461
+ } else if (value2?.type === "pick" || value2?.type === "Pick") {
8462
8462
  const target = resolveProperties(bgioArguments, value2.target, context, "target");
8463
8463
  return (0, import_pick.default)(
8464
8464
  resolveProperties(
@@ -8469,7 +8469,7 @@ function resolveProperty(bgioArguments, value2, context) {
8469
8469
  ),
8470
8470
  value2.properties
8471
8471
  );
8472
- } else if (value2?.type === "Coordinates") {
8472
+ } else if (value2?.type === "coordinates" || value2?.type === "Coordinates") {
8473
8473
  const originalTarget = value2.target ? resolveProperties(bgioArguments, value2.target, context, "target") : context.originalTarget;
8474
8474
  const parent = bgioArguments.G.bank.findParent(originalTarget);
8475
8475
  return parent.getCoordinates(originalTarget.rule.index);
@@ -27071,7 +27071,7 @@ function createPayload(bgioState, moveRule, targets, context) {
27071
27071
  var Client2 = class {
27072
27072
  constructor(options) {
27073
27073
  this.options = options;
27074
- this.game = options.boardgameIOGame || gameFactory(JSON.parse(options.gameRules));
27074
+ this.game = options.boardgameIOGame || gameFactory(JSON.parse(options.gameRules), options.gameName);
27075
27075
  if (!options.boardgameIOGame) {
27076
27076
  this.moveBuilder = { targets: [], stepIndex: 0, eliminatedMoves: [] };
27077
27077
  this.optimisticWinner = null;
@@ -8425,10 +8425,10 @@ ${message}`);
8425
8425
  return get(bgioArguments.ctx, value2.path);
8426
8426
  } else if (value2?.type === "gamePath") {
8427
8427
  return get(bgioArguments.G, value2.path);
8428
- } else if (value2?.type === "RelativePath") {
8428
+ } else if (value2?.type === "relativePath" || value2?.type === "RelativePath") {
8429
8429
  const target = resolveProperties(bgioArguments, value2.target, context, "target");
8430
8430
  return get(target.attributes, value2.path) ?? null;
8431
- } else if (value2?.type === "Parent") {
8431
+ } else if (value2?.type === "parent" || value2?.type === "Parent") {
8432
8432
  const originalTarget = value2.target ? resolveProperties(bgioArguments, value2.target, context, "target") : context.originalTarget;
8433
8433
  return bgioArguments.G.bank.findParent(originalTarget) ?? null;
8434
8434
  } else if (value2?.type === "map") {
@@ -8458,7 +8458,7 @@ ${message}`);
8458
8458
  }
8459
8459
  }
8460
8460
  return maxTargets;
8461
- } else if (value2?.type === "Pick") {
8461
+ } else if (value2?.type === "pick" || value2?.type === "Pick") {
8462
8462
  const target = resolveProperties(bgioArguments, value2.target, context, "target");
8463
8463
  return (0, import_pick.default)(
8464
8464
  resolveProperties(
@@ -8469,7 +8469,7 @@ ${message}`);
8469
8469
  ),
8470
8470
  value2.properties
8471
8471
  );
8472
- } else if (value2?.type === "Coordinates") {
8472
+ } else if (value2?.type === "coordinates" || value2?.type === "Coordinates") {
8473
8473
  const originalTarget = value2.target ? resolveProperties(bgioArguments, value2.target, context, "target") : context.originalTarget;
8474
8474
  const parent = bgioArguments.G.bank.findParent(originalTarget);
8475
8475
  return parent.getCoordinates(originalTarget.rule.index);
@@ -27071,7 +27071,7 @@ ${message}`);
27071
27071
  var Client2 = class {
27072
27072
  constructor(options) {
27073
27073
  this.options = options;
27074
- this.game = options.boardgameIOGame || gameFactory(JSON.parse(options.gameRules));
27074
+ this.game = options.boardgameIOGame || gameFactory(JSON.parse(options.gameRules), options.gameName);
27075
27075
  if (!options.boardgameIOGame) {
27076
27076
  this.moveBuilder = { targets: [], stepIndex: 0, eliminatedMoves: [] };
27077
27077
  this.optimisticWinner = null;