Paper, Scissors, Stone
Paper, Scissors, Stone

"; if (!$pscore){ $pscore='0';} if (!$cscore){ $cscore='0';} $pscore = HTMLSpecialChars($pscore); $cscore = HTMLSpecialChars($cscore); $guess = HTMLSpecialChars($guess); $number = rand(1,3); if ($guess == 1) { if ($number == 1) { echo "
$pscore$cscore
You chose paper. So did the computer. You drew.
"; } if ($number == 2) { $cscore = $cscore + 1; echo "
$pscore$cscore
You chose paper. The computer chose scissors. You lost.
"; } if ($number == 3) { $pscore = $pscore + 1; echo "
$pscore$cscore
You chose paper. The computer chose stone. You won.
"; } } if ($guess == 2) { if ($number == 1) { $pscore = $pscore + 1; echo "
$pscore$cscore
You chose scissors. The computer chose paper. You won.
"; } if ($number == 2) { echo "
$pscore$cscore
You chose scissors. So did the computer. You drew.
"; } if ($number == 3) { $cscore = $cscore + 1; echo "
$pscore$cscore
You chose scissors. The computer chose stone. You lost.
"; } } if ($guess == 3) { if ($number == 1) { $cscore = $cscore + 1; echo "
$pscore$cscore
You chose stone. The computer chose paper. You lost.
"; } if ($number == 2) { $pscore = $pscore + 1; echo "
$pscore$cscore
You chose stone. The computer chose scissors. You won.
"; } if ($number == 3) { echo "
$pscore$cscore
You chose stone. So did the computer. You drew.
"; } } echo "

Play: Paper, Scissors or Stone?

"; ?>