Skip to content

Commit

Permalink
vqa
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgrunwald committed Nov 7, 2024
1 parent d27bf9c commit 4dcaa40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ enum SignContent {
TechSupport = 'tech-support-avatar.png',
TickTock = 'tick-tock-avatar.png',
UnionFist = 'union-fist.png',
ReadyToStrike = 'ready-to-strike_text-only-avatar.png',
ReadyToStrike = 'ready-to-strike_text-only-avatar.png'
}

export interface Card {
Expand Down Expand Up @@ -43,7 +43,7 @@ export function getInitialCards(countCardsInPlay: number): Card[] {
}

// note, sort(() => 0.5 - Math.random()) and similar are biased; see <https://stackoverflow.com/a/12646864>
function shuffleArray(array: unknown[]) {
function shuffleArray<T>(array: T[]) {
for (let i = array.length - 1; i >= 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dialog/Dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
height: 100vh;
width: 100vw;
display: flex;
color: var(--color);
background-color: var(--background-color);
Expand Down
1 change: 1 addition & 0 deletions src/components/ResultsDialog/ResultsDialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.results-container {
justify-content: start;
align-items: center;
text-align: center;
display: flex;
flex-direction: column;
gap: 1rem;
Expand Down

0 comments on commit 4dcaa40

Please sign in to comment.