-
-
Save creyn/df50d6e13ee548680a2468ff28fce26c to your computer and use it in GitHub Desktop.
Droga Programisty : Szybkie Palce : funkcja CzyKtosOszukiwal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Funkcja sprawdzajaca czy ktorys z graczy nie oszukiwal | |
function CzyKtosOszukiwal() { | |
if(licznikNacisniecGracz1 > limitNacisniec && licznikNacisniecGracz2 > limitNacisniec){ | |
Oszust('Obaj Gracze oszukiwali. Nikt nie wygrywa!'); | |
return true; | |
} | |
if(licznikNacisniecGracz1 > limitNacisniec) { | |
Oszust('Gracz nr 1 oszukiwał. Wygrywa Gracz nr 2!'); | |
return true; | |
} | |
if(licznikNacisniecGracz2 > limitNacisniec) { | |
Oszust('Gracz nr 2 oszukiwał. Wygrywa Gracz nr 1!'); | |
return true; | |
} | |
// nie znaleziono oszusta | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment