Here’s a simple way to randomly assign one player as the “impostor”:
- Create a list of all players (e.g.,
players = ["Player1", "Player2", ...]). - Use a randomization function from your programming language (e.g.,
random.choicein Python). - Randomly select one player:
impostor = random.choice(players). - Remove the selected impostor from the list if needed:
players.remove(impostor). - Share the impostor’s identity only with them.
- Proceed with the game logic, ensuring other players do not know the impostor’s identity.