added random selection functionality for player 2