<?php
$YourDice1 = 2;
$YourDice2 = 2;
$PCDice1 = 4;
$PCDice2 = 4;
echo "У тебя выпало {$YourDice1} и {$YourDice2}\nУ компьютера выпало {$PCDice1} и {$PCDice2}\n";
$YourSum = ($YourDice1 + $YourDice2);
$PCSum = ($PCDice1 + $PCDice2);
if (($YourDice1 == $YourDice2) & ($PCDice1 == $PCDice2)) {
echo "Дабл! Ты победил!\n";
}
if ($YourSum > $PCSum) {
echo "У тебя больше. Ты победил!\n";
}
if ($YourSum < $PCSum) {
echo "Поражение!\n";
}
PD9waHAKIAplcnJvcl9yZXBvcnRpbmcoLTEpOwogCiRZb3VyRGljZTEgPSAyOwokWW91ckRpY2UyID0gMjsKIAokUENEaWNlMSA9IDQ7CiRQQ0RpY2UyID0gNDsKIAplY2hvICLQoyDRgtC10LHRjyDQstGL0L/QsNC70L4geyRZb3VyRGljZTF9INC4IHskWW91ckRpY2UyfVxu0KMg0LrQvtC80L/RjNGO0YLQtdGA0LAg0LLRi9C/0LDQu9C+IHskUENEaWNlMX0g0LggeyRQQ0RpY2UyfVxuIjsKIAokWW91clN1bSA9ICgkWW91ckRpY2UxICsgJFlvdXJEaWNlMik7CiRQQ1N1bSA9ICgkUENEaWNlMSArICRQQ0RpY2UyKTsKIAppZiAoKCRZb3VyRGljZTEgPT0gJFlvdXJEaWNlMikgJiAoJFBDRGljZTEgPT0gJFBDRGljZTIpKSB7CgllY2hvICLQlNCw0LHQuyEg0KLRiyDQv9C+0LHQtdC00LjQuyFcbiI7Cn0KIAppZiAoJFlvdXJTdW0gPiAkUENTdW0pIHsKCWVjaG8gItCjINGC0LXQsdGPINCx0L7Qu9GM0YjQtS4g0KLRiyDQv9C+0LHQtdC00LjQuyFcbiI7Cn0KIAppZiAoJFlvdXJTdW0gPCAkUENTdW0pIHsKCWVjaG8gItCf0L7RgNCw0LbQtdC90LjQtSFcbiI7Cn0=