texas-poker-core 1.4.28 → 1.4.29

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/README.md CHANGED
@@ -616,4 +616,8 @@ fix: 修复结算金额分配异常
616
616
  reject modulo bias
617
617
 
618
618
  ## 1.4.28
619
- 贴盲与game start原子化
619
+
620
+ 贴盲与 game start 原子化
621
+
622
+ ## 1.4.29
623
+ 修复post bb玩家过牌导致的异常
@@ -33,7 +33,9 @@ function resolveAllowedActions(ctx) {
33
33
  });
34
34
  return _helper(player !== null && player !== void 0 ? player : null);
35
35
  }
36
- if (lastPlayer.getAction().type === _constant.ActionTypeEnum.CHECK) return [_constant.ActionTypeEnum.ALL_IN, _constant.ActionTypeEnum.BET, _constant.ActionTypeEnum.CHECK, _constant.ActionTypeEnum.FOLD];
36
+ if (lastPlayer.getAction().type === _constant.ActionTypeEnum.CHECK && lastPlayer.currentStageTotalAmount === 0) {
37
+ return [_constant.ActionTypeEnum.ALL_IN, _constant.ActionTypeEnum.BET, _constant.ActionTypeEnum.CHECK, _constant.ActionTypeEnum.FOLD];
38
+ }
37
39
  if (ctx.selfBalance + ctx.selfCurrentStageTotal <= ctx.maxOthersStageBet) {
38
40
  return [_constant.ActionTypeEnum.ALL_IN, _constant.ActionTypeEnum.FOLD];
39
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "texas-poker-core",
3
- "version": "1.4.28",
3
+ "version": "1.4.29",
4
4
  "description": "德州扑克核心功能",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
@@ -14,6 +14,7 @@ export type AllowedActionsContext = {
14
14
  type: ActionTypeEnum;
15
15
  } | undefined;
16
16
  getStatus(): string;
17
+ readonly currentStageTotalAmount: number;
17
18
  }[];
18
19
  maxOthersStageBet: number;
19
20
  isBigBlindPreFlopOption: boolean;