From 63794a6e3393aabbb39ae729bc9c021032c21981 Mon Sep 17 00:00:00 2001 From: Wenhao Ji Date: Sat, 23 Nov 2024 14:59:17 -0800 Subject: [PATCH] Display the action buttons that are actionable only --- src/App.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index bd4c924..a73599f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -151,11 +151,19 @@ function ActionButtons(props: { callAmount === 0 ? 'CHECK' : <>CALL
${callAmount} } - RAISE
1/2 pot
- RAISE
1 pot
- RAISE
2 pot
+ { + callAmount <= Math.ceil(potAmount / 2) && RAISE
1/2 pot
+ } + { + callAmount <= potAmount && RAISE
1 pot
+ } + { + callAmount <= (potAmount * 2) && RAISE
2 pot
+ } ALL-IN - FOLD + { + callAmount > 0 && FOLD + } ); }