How to fix computer choice in Rock Paper Scissors

I believe the problem is in your RandomPlayer class. Instead of returning index in your move method, you should return the move related to that index. In other words, your RandomPlayer class should be:


class RandomPlayer(Player):
    def move(self):
        index = random.randint(0, 2)  # Selects random moves from the move list
        return moves[index]  # Changed from return (index)

Leave a Comment