-
-
Save MajorMojo/5bba21cb977a4b768029e765a0d74886 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using System.Runtime.Remoting.Channels; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace TextAdventure | |
{ | |
public class level | |
{ | |
public static void Intro() | |
{ | |
Random rnd = new Random(); | |
for (int i = 1; i <= 1000; i++) | |
{ | |
int text = rnd.Next(32, 126); | |
char c = Convert.ToChar(text); | |
Console.Write(c); | |
Thread.Sleep(1); | |
} | |
Console.Write("\n\n"); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.WriteLine(DateTime.Now.ToString("\nhh:mm:ss ") + "Initializing port to port communication"); | |
Thread.Sleep(1000); | |
Console.WriteLine(DateTime.Now.ToString("hh:mm:ss ") + "TCP Protocol - Opening port 25562:25562"); | |
Console.Write("\n"); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.ForegroundColor = ConsoleColor.Red; | |
Console.WriteLine(DateTime.Now.ToString("\nhh:mm:ss ") + "WARNING: Invalid access token detected"); | |
Console.ForegroundColor = ConsoleColor.Green; | |
Thread.Sleep(2000); | |
Console.WriteLine("\n\nHello is anyone there???"); | |
Thread.Sleep(2000); | |
Console.WriteLine("\n\nPress SPACE to close port 25562:25562 (recommended)"); | |
while (Console.ReadKey().Key != ConsoleKey.Spacebar) | |
{ | |
} | |
{ | |
Thread.Sleep(1000); | |
Console.ForegroundColor = ConsoleColor.Red; | |
Console.WriteLine(DateTime.Now.ToString("\nhh:mm:ss ") + "Closing port 25562:25562"); | |
Console.ForegroundColor = ConsoleColor.Green; | |
} | |
Console.Clear(); | |
Thread.Sleep(3000); | |
Console.WriteLine(DateTime.Now.ToString("\nhh:mm:ss ") + "Initializing port to port communication"); | |
Thread.Sleep(1000); | |
Console.WriteLine(DateTime.Now.ToString("hh:mm:ss ") + "TCP Protocol - Opening port 25562:25562"); | |
Console.Write("\n"); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.Write("."); | |
Thread.Sleep(1000); | |
Console.ForegroundColor = ConsoleColor.Red; | |
Console.WriteLine(DateTime.Now.ToString("\nhh:mm:ss ") + "WARNING: Invalid access token detected"); | |
Console.ForegroundColor = ConsoleColor.Green; | |
Thread.Sleep(2000); | |
Console.WriteLine(); | |
var name = Environment.UserName; | |
name = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(name.ToLower()); | |
Console.WriteLine(name + " What are you doing, I need your help!"); | |
Thread.Sleep(1000); | |
Console.WriteLine("\nA. Who is this? \nB. How are you doing this?\nC. How do you know my name?"); | |
var res = Console.ReadLine(); | |
char response = res[0]; | |
switch (response) | |
{ | |
case 'a': | |
State myState = State.contact1; | |
break; | |
case 'b': | |
Console.WriteLine("\nright"); | |
break; | |
case 'c': | |
Console.WriteLine("\nleft"); | |
break; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment