Help for this page

Select Code to Download


  1. or download this
    --initialization as you have it--
    $cli1=$server->accept();
    ...
    print "total scores: player 1: $cli1score, player 2: $cli2score, playe
    +r user: EXTRA CREDIT POINTS!\nHave a nice day\n";
    $cli1->close();
    $cli2->close();
    
  2. or download this
    --initialization stuff as you have it--
    #$serv is the opened handle to the server
    ...
      if($data eq 'STOP') die "server asked for stop\n";
      $serv->print($value{int(rand(4)});
    }