Skip to content

Commit a476af5

Browse files
authored
Merge pull request #478 from Kaggle/state-communication
Improve label formatting and swap player labels
2 parents 2a0db7e + 5eb7ff1 commit a476af5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

kaggle_environments/envs/open_spiel_env/games/repeated_poker/repeated_poker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,9 @@ function renderer(options) {
701701
}
702702
else {
703703
if (playerData.isDealer) {
704-
betDisplay.textContent = 'small blind';
704+
betDisplay.textContent = 'Small Blind';
705705
} else {
706-
betDisplay.textContent = 'big blind';
706+
betDisplay.textContent = 'Big Blind';
707707
}
708708
}
709709
betDisplay.style.display = 'block';

kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/src/components/getRepeatedPokerStateForStep.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ function _getLastMovesACPC(bettingString, currentPlayer) {
2222
if (char === 'c') {
2323
// 'c' (call/check)
2424
if (isAggressiveActionOpen) {
25-
move = 'call';
25+
move = 'Call';
2626
} else {
27-
move = 'check';
27+
move = 'Check';
2828
}
2929
isAggressiveActionOpen = false; // 'c' never leaves action open
3030
i++;
3131
} else if (char === 'f') {
3232
// 'f' (fold)
33-
move = 'fold';
33+
move = 'Fold';
3434
isAggressiveActionOpen = false; // 'f' ends the hand
3535
i++;
3636
} else if (char === 'r') {
@@ -42,7 +42,7 @@ function _getLastMovesACPC(bettingString, currentPlayer) {
4242
amount += streetAction[i];
4343
i++;
4444
}
45-
move = `raise ${amount}`;
45+
move = `Raise ${amount}`;
4646
isAggressiveActionOpen = true; // 'r' always leaves action open
4747
} else {
4848
// Should not happen with valid input, but good to prevent infinite loops

kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/src/repeated_poker_renderer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ export function renderer(options) {
597597
const playerNameElement = elements.playerNames[index];
598598
if (playerNameElement) {
599599
const playerNameText =
600-
playerData.isTurn && !isTerminal ? `${playerData.name} responding...` : playerData.name;
600+
!playerData.isTurn && !isTerminal ? `${playerData.name} responding...` : playerData.name;
601601
playerNameElement.textContent = playerNameText;
602602

603603
// Highlight current player's turn
@@ -661,9 +661,9 @@ export function renderer(options) {
661661
betDisplay.textContent = data.lastMoves[index];
662662
} else {
663663
if (playerData.isDealer) {
664-
betDisplay.textContent = 'small blind';
664+
betDisplay.textContent = 'Small Blind';
665665
} else {
666-
betDisplay.textContent = 'big blind';
666+
betDisplay.textContent = 'Big Blind';
667667
}
668668
}
669669
betDisplay.style.display = 'block';

0 commit comments

Comments
 (0)