@bct-app/game-engine 0.1.9 → 0.1.10

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.
package/dist/index.js CHANGED
@@ -589,22 +589,22 @@ var getCandidatesBySelector = (dynamicTarget, sortedPlayers, anchorSeat, payload
589
589
  if (scope === "LEFT_SIDE") {
590
590
  const left2 = [];
591
591
  for (let step = 1; step < total; step += 1) {
592
- left2.push(sortedPlayers[(anchorIdx - step + total) % total]);
592
+ left2.push(sortedPlayers[(anchorIdx + step) % total]);
593
593
  }
594
594
  return left2;
595
595
  }
596
596
  if (scope === "RIGHT_SIDE") {
597
597
  const right2 = [];
598
598
  for (let step = 1; step < total; step += 1) {
599
- right2.push(sortedPlayers[(anchorIdx + step) % total]);
599
+ right2.push(sortedPlayers[(anchorIdx - step + total) % total]);
600
600
  }
601
601
  return right2;
602
602
  }
603
603
  const left = [];
604
604
  const right = [];
605
605
  for (let step = 1; step < total; step += 1) {
606
- left.push(sortedPlayers[(anchorIdx - step + total) % total]);
607
- right.push(sortedPlayers[(anchorIdx + step) % total]);
606
+ left.push(sortedPlayers[(anchorIdx + step) % total]);
607
+ right.push(sortedPlayers[(anchorIdx - step + total) % total]);
608
608
  }
609
609
  return [...left, ...right];
610
610
  };
package/dist/index.mjs CHANGED
@@ -549,22 +549,22 @@ var getCandidatesBySelector = (dynamicTarget, sortedPlayers, anchorSeat, payload
549
549
  if (scope === "LEFT_SIDE") {
550
550
  const left2 = [];
551
551
  for (let step = 1; step < total; step += 1) {
552
- left2.push(sortedPlayers[(anchorIdx - step + total) % total]);
552
+ left2.push(sortedPlayers[(anchorIdx + step) % total]);
553
553
  }
554
554
  return left2;
555
555
  }
556
556
  if (scope === "RIGHT_SIDE") {
557
557
  const right2 = [];
558
558
  for (let step = 1; step < total; step += 1) {
559
- right2.push(sortedPlayers[(anchorIdx + step) % total]);
559
+ right2.push(sortedPlayers[(anchorIdx - step + total) % total]);
560
560
  }
561
561
  return right2;
562
562
  }
563
563
  const left = [];
564
564
  const right = [];
565
565
  for (let step = 1; step < total; step += 1) {
566
- left.push(sortedPlayers[(anchorIdx - step + total) % total]);
567
- right.push(sortedPlayers[(anchorIdx + step) % total]);
566
+ left.push(sortedPlayers[(anchorIdx + step) % total]);
567
+ right.push(sortedPlayers[(anchorIdx - step + total) % total]);
568
568
  }
569
569
  return [...left, ...right];
570
570
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bct-app/game-engine",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Game engine utilities for BCT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",