internal class Program
{
private static void Main(string[] args)
{
bool end = false;
while (end != true)
{
Random rnd = new Random();
int rps = rnd.Next(1, 4);
Console.WriteLine("Rock Paper Scissors");
string input = Console.ReadLine().Trim();
if (input == "Rock" && rps == 1)
Console.WriteLine("You Win");
end = true;
if (input == "Rock" && rps == 2)
Console.WriteLine("You Lose");
end = true;
if (input == "Rock" && rps == 3)
Console.WriteLine("Tie, play again");
}
}
}
In this program, I am trying to create a rock paper scissors program however, when it rps == 3 and its a tie, instead of starting from the beginning of the while statement, it does not do anything - regardless of the input it stops.
What is wrong?