-
Notifications
You must be signed in to change notification settings - Fork 1
Description
During testing with Mastermind, I encountered an issue: while the description permits duplicate colours in the secret_code, the code in game.py implements this using: random.sample(self.possible_colors, k=self.code_length) The random.sample() function performs sampling without replacement, meaning it cannot generate secret_codes containing duplicate colours. Should I modify how secret_codes are generated, for instance by switching to random.choice() to permit duplicate colours? The random.sample() function performs sampling without replacement, meaning it will not generate secret_codes containing duplicate colours. Should the secret_code generation method be modified, for instance by switching to the random.choice() function, to permit duplicate colours within the secret_code?