Skip to content

Commit

Permalink
#2: Kiértékelés és pontok, állás kiirása
Browse files Browse the repository at this point in the history
  • Loading branch information
PAULTR71 committed Mar 6, 2019
1 parent 45cdc4c commit 053e0e2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions kpo/kpo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,32 @@ static void Main(string[] args)
compChoice = "olló";
break;
}
///Feladat 5: Értékeljük ki a compChoice és a playerChoice
///változókat
///
if (
(playerChoice == "kő" && compChoice == "papir") ||
(playerChoice == "papir" && compChoice == "olló") ||
(playerChoice == "olló" && compChoice == "kő")
)
{
Console.WriteLine("Számítógép: " + compChoice + " Te: " + playerChoice);
Console.WriteLine("Veszitettél! Állás: Szg: {0} Játékos: {1}", ++compScore, playerScore);

}
else if (playerChoice == compChoice)
{
Console.WriteLine("Számítógép: " + compChoice + " Te: " + playerChoice);
Console.WriteLine("Döntetlen! Állás: Szg: {0} Játékos: {1}", compScore, playerScore);
}
else
{
Console.WriteLine("Számítógép: " + compChoice + " Te: " + playerChoice);
Console.WriteLine("Nyertél! Állás: Szg: {0} Játékos: {1}", compScore, ++playerScore);

}




Console.Write("Akarsz még játszani? i/n");
Expand Down

0 comments on commit 053e0e2

Please sign in to comment.