Next Program Repair Shop 185

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[int rand @available_choices];


Next Copyright © 2001 M. J. Dominus