So I am making a basic Zork console application games with one move. The doors are randomized each time (not finished yet) and the player has to guess which door to through with only one allowing passage. However to make the user type quicker i want to give the illusion of the walls closing in on them with a countdown timer and if they do no type anything before this reaches zero they are 'killed' however I can't figure out how to add a Countdown timer in but also have the console check for an input from the user regarding moving. Here is my current code and bare in mind it is not finished yet.
using System;
using System.Threading;
namespace Prog4
{
class program
{
public static void Main(string[] args)
{
Random random = new Random();
int north = random.Next(1,5);
int south = random.Next(1,5);
int east = random.Next(1,5);
int west = random.Next(1,5);
Console.WriteLine("You are in a room that is slowly closing in on you, it has only four exits." + Environment.NewLine +
"The four exits face: North, South, East and West. " + Environment.NewLine +
"Use n for North, s for South, e for East and w for West" + Environment.NewLine +
"Only one exit leads to outside, the rest lead to certain doooooooooooooom");
}
}
}