int win = choice - aiChoice;
//0가위 1바위 2보
if (choice == aiChoice)
{
Console.WriteLine("draw");
}
else if (win == 1 || win == -2)
Console.WriteLine("win");
else
Console.WriteLine("lose");
int win = choice - aiChoice;
//0가위 1바위 2보
if (choice == aiChoice)
{
Console.WriteLine("draw");
}
else if (win == 1 || win == -2)
Console.WriteLine("win");
else
Console.WriteLine("lose");
int cal = choice - aiChoice;
bool win = (cal == 1) || (cal == -2);
// choice aichoice
//0가위 1바위 2보
if (choice == aiChoice)
{
Console.WriteLine("draw");
}
else if (win)
Console.WriteLine("win");
else
Console.WriteLine("lose");
답글