Skip to content

Commit 037c803

Browse files
committed
make winner icon white + move some permanent css to styles
1 parent 53f4550 commit 037c803

File tree

2 files changed

+54
-23
lines changed

2 files changed

+54
-23
lines changed

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

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -590,44 +590,28 @@ export function renderer(options: RendererOptions): void {
590590
// --- Container Styles ---
591591
const container = document.createElement('div');
592592
container.className = 'final-screen-container';
593-
// Using inline styles here to ensure it looks acceptable immediately without CSS file updates.
594-
// You can move these to your style.css later, but as this is just a placeholder screen making it easy to clean up for now.
595-
container.style.cssText = `
596-
display: flex;
597-
flex-direction: column;
598-
align-items: center;
599-
justify-content: center;
600-
height: 100%;
601-
width: 100%;
602-
background: rgba(15, 23, 42, 0.95); /* Dark blue-gray background */
603-
color: white;
604-
font-family: sans-serif;
605-
padding: 40px;
606-
box-sizing: border-box;
607-
`;
608593

609594
// --- Winner Section ---
610595
const winnerSection = document.createElement('div');
611596
winnerSection.className = 'final-winner-section';
612-
winnerSection.style.cssText = 'text-align: center; margin-bottom: 60px; flex-shrink: 0;';
597+
winnerSection.classList.add('winner-section');
613598

614599
if (winner) {
615600
if (winner.thumbnail) {
616601
const thumb = document.createElement('img');
617602
thumb.src = winner.thumbnail;
618-
thumb.style.cssText =
619-
'width: 180px; height: 180px; border-radius: 50%; border: 6px solid #eab308; box-shadow: 0 0 30px rgba(234, 179, 8, 0.4); margin-bottom: 20px;';
603+
thumb.classList.add('winner-thumbnail');
620604
winnerSection.appendChild(thumb);
621605
}
622606

623607
const winnerName = document.createElement('div');
624608
winnerName.textContent = `${winner.name} Wins!`;
625-
winnerName.style.cssText = 'font-size: 3.5em; color: #eab308; font-weight: bold;';
609+
winnerName.classList.add('winner-name');
626610
winnerSection.appendChild(winnerName);
627611

628612
const finalStack = document.createElement('div');
629613
finalStack.textContent = `Final Rewards: ${winner.chipStack}`;
630-
finalStack.style.cssText = 'font-size: 2em; color: #9ca3af; margin-top: 10px;';
614+
finalStack.classList.add('winner-final-rewards');
631615
winnerSection.appendChild(finalStack);
632616
}
633617

kaggle_environments/envs/open_spiel_env/games/repeated_poker/visualizer/default/src/style.css

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
}
168168

169169
.player-info-area.split-pot {
170-
border-color: #FF5C19;
170+
border-color: #ff5c19;
171171
}
172172

173173
.player-container-0 .player-info-area {
@@ -461,12 +461,12 @@
461461

462462
.bet-display.split-pot {
463463
opacity: 1;
464-
background-color: #FF5C19;
464+
background-color: #ff5c19;
465465
}
466466

467467
.bet-display.all-in {
468468
color: white;
469-
background-color: #B3261E;
469+
background-color: #b3261e;
470470
}
471471

472472
.blind-indicator {
@@ -590,6 +590,8 @@
590590
white-space: nowrap;
591591
}
592592

593+
/* LEGEND */
594+
593595
.legend {
594596
position: absolute;
595597
top: 20px;
@@ -679,3 +681,48 @@
679681
background-color: white;
680682
padding: 2px;
681683
}
684+
685+
/* FINAL WINNER SECTION */
686+
687+
.final-screen-container {
688+
display: flex;
689+
flex-direction: column;
690+
align-items: center;
691+
justify-content: center;
692+
height: 100%;
693+
width: 100%;
694+
background: rgba(15, 23, 42, 0.95); /* Dark blue-gray background */
695+
color: white;
696+
font-family: sans-serif;
697+
padding: 40px;
698+
box-sizing: border-box;
699+
}
700+
701+
.winner-section {
702+
text-align: center;
703+
margin-bottom: 60px;
704+
flex-shrink: 0;
705+
}
706+
707+
.winner-thumbnail {
708+
width: 160px;
709+
height: 160px;
710+
border-radius: 50%;
711+
border: 6px solid #eab308;
712+
box-shadow: 0 0 30px rgba(234, 179, 8, 0.4);
713+
margin-bottom: 20px;
714+
background-color: white;
715+
padding: 10px;
716+
}
717+
718+
.winner-name {
719+
font-size: 3.5em;
720+
color: #eab308;
721+
font-weight: bold;
722+
}
723+
724+
.winner-final-rewards {
725+
font-size: 2em;
726+
color: #9ca3af;
727+
margin-top: 10px;
728+
}

0 commit comments

Comments
 (0)