所以我想为我的计算机课做一个文本冒险游戏.我知道C#的基础知识,但显然我错过了一些东西,因为我无法正确使用代码.我想让这个男人问玩家一个问题,如果他们回答否,它基本上会重复这个问题,因为他们必须回答是,游戏才能继续.我尝试使用for循环但是效果不好.无论如何,这是我的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("MINECRAFT TEXT ADVENTURE: PART 1!");
Console.WriteLine("\"Hello traveller!\" says a man. \"What's your name?\"");
string playerName = Console.ReadLine();
Console.WriteLine("\"Hi " + playerName + ", welcome to Minecraftia!\nI would give you a tour of our little town but there really isn't much left to\nsee since the attack.\"");
Console.WriteLine("He looks at the stone sword in your hand. \"Could you defeat the zombies in …Run Code Online (Sandbox Code Playgroud)