Comment

Comment by strangestchild

You're simulating a full game of poker. Once a player has been given card 'i', you have to ensure that card 'i' isn't drawn again during the game. You could maintain a set containing all cards that have already been drawn, and re-select your random number if you draw a duplicate, but that's going to get awfully laggy once large numbers of cards have been drawn.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton