implemented random player with tests