diff --git a/src/main/c/SchereSteinPapier.c b/src/main/c/SchereSteinPapier.c index 7fe7346..8ff5849 100644 --- a/src/main/c/SchereSteinPapier.c +++ b/src/main/c/SchereSteinPapier.c @@ -3,24 +3,24 @@ #include #include -int game(char Player1, char computer) +int game(char Player1, char Player2) { - if (Player1 == '1' && computer == '1') + if (Player1 == '1' && Player2 == '1') return -1; - if (Player1 == '2' && computer == '2') + if (Player1 == '2' && Player2 == '2') return -1; - if (Player1 == '3' && computer == '3') + if (Player1 == '3' && Player2 == '3') return -1; - if (Player1 == '2' && computer == '3') + if (Player1 == '2' && Player2 == '3') return 0; - else if (Player1 == '3' && computer == '2') return 1; - if (Player1 == '2' && computer == '1') + else if (Player1 == '3' && Player2 == '2') return 1; + if (Player1 == '2' && Player2 == '1') return 1; - else if (Player1 == '1' && computer == '2') + else if (Player1 == '1' && Player2 == '2') return 0; - if (Player1 == '3' && computer == '1') + if (Player1 == '3' && Player2 == '1') return 0; - else if (Player1 == '1' && computer == '3') + else if (Player1 == '1' && Player2 == '3') return 1; }