我完全不了解方法,我不知道为什么会发生这种情况......我试图让我的代码改为单词,我认为这是要走的路.
namespace ConsoleApplication9
{
class Program
{
static void Main(string[] args)
{
Random r = new Random();
Console.WriteLine("Hi wanna play rock paper scissors?<press enter to continue>");
Console.ReadKey();
int user = 0;
int ai = r.Next(1, 4);
Console.WriteLine("Pick what youll show! (1-rock, 2-paper, 3-scissors) and press enter");
user = Convert.ToInt32(Console.ReadLine());
if (user > 3)
{
Console.WriteLine("ERROR! your number must be <= 3. <Press enter to close the program>");
goto end;
}
if (user == ai)
{
Console.WriteLine("Its a draw! <press enter …Run Code Online (Sandbox Code Playgroud) {
Random r = new Random();
int current = 0;
int noa = 0;
while (current != 6) {
current =r.Next(1,7);
noa += 1;
Console.WriteLine(current + " has been rolled.");
}
if (noa >= 10)
{
Console.WriteLine("You were unlucky and it took you "+ noa + " times to roll a 6!");
}
if (noa <= 5)
{
Console.WriteLine("You were quite lucky and it took you " + noa + " times to roll a 6!");
}
else
{
Console.WriteLine("It …Run Code Online (Sandbox Code Playgroud)