Next Program Repair Shop 177

get_computer_choice

           sub get_computer_choice {
              my $number = int(rand() * (@_ - 1));
              return $_[$number];
           }
           sub get_computer_choice {
              my $number = int(rand(@_));
              return $_[$number];
           }
           sub get_computer_choice {
              $_[int rand @_];
           }
     108  $computer_move = $available_choices[rand @available_choices];


Next Copyright © 2002 M. J. Dominus