Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace RPG
- {
- class MainClass
- {
- public static void Main(string[] args)
- {
- //Done(); will check if Cords are at end of game
- //variables
- string response = "";
- string name = "";
- bool hastyped = false;
- //Coordinates
- int xCord = 0; int yCord = 0;
- void Done()
- {
- if (yCord == 5 && xCord == 7)
- {
- Console.WriteLine("Thanks for playing! You did it!");
- }
- }
- void Move()
- {
- if (hastyped == true)
- {
- if (response == "E")
- {
- xCord = xCord + 1;
- }
- else if (response == "W")
- {
- xCord = xCord - 1;
- }
- else if (response == "N")
- {
- xCord = xCord + 1;
- }
- else if (response == "S")
- {
- xCord = xCord - 1;
- }
- else
- {
- Console.WriteLine("That movement is invalid.");
- }
- hastyped = false;
- response = "";
- Done();
- }
- }
- //FANCY START LOGO
- Console.WriteLine(@"
- ____________ _____
- | ___ \ ___ \ __ \
- | |_/ / |_/ / | \/
- | /| __/| | __
- | |\ \| | | |_\ \
- \_| \_\_| \____/
- "
- );
- System.Threading.Thread.Sleep(2500);
- while (response != "Y")
- {
- Console.WriteLine("Please answer with Y for yes and N for no. Please try to answer all questions as simply as possible.\nPlease type N for north, E for east, S for south and W for west.");
- Console.WriteLine("Ok?");
- response = Console.ReadLine();
- if (response == "Y")
- {
- Console.WriteLine("Well lets start:");
- }
- else
- {
- Console.WriteLine("Please try again.");
- }
- }
- //Instructions
- Console.WriteLine("LOADING...");
- Console.WriteLine("7%");
- System.Threading.Thread.Sleep(200);
- Console.WriteLine("26 %");
- System.Threading.Thread.Sleep(100);
- Console.WriteLine("48%");
- System.Threading.Thread.Sleep(200);
- Console.WriteLine("76%");
- System.Threading.Thread.Sleep(600);
- Console.WriteLine("87%");
- System.Threading.Thread.Sleep(400);
- Console.WriteLine("99%");
- System.Threading.Thread.Sleep(20);
- Console.WriteLine("100%");
- //Loading...
- Console.WriteLine("Hey buddy, you took that hit pretty hard. Are you alright?");
- Console.ReadLine();
- Console.WriteLine("Well we need to get you to a hospital.\nSorry, what was your name?");
- name = Console.ReadLine();
- Console.WriteLine("Well " + name + ", I wish we were meeting under better circumstances.");
- Console.WriteLine("Anyway, I'm Dave. Off to the East is a path that looks pretty safe, the only other direction is back to the west where I just found you. So we won't go there.");
- Console.WriteLine("YOU MOVED EAST!!!");
- xCord = xCord + 1;
- //Intro
- //GAMEPLAY
- while (true)
- {
- //1,0
- if (xCord == 1 && yCord == 0)
- {
- Console.WriteLine("Hit E then enter for testing.");
- response = Console.ReadLine();
- hastyped = !string.IsNullOrWhiteSpace(response);
- if (hastyped == true)
- {
- Move();
- }
- }
- //2,0
- if (xCord == 2 && yCord == 0)
- {
- Console.WriteLine("It worked.");
- }
- //3,0
- if (xCord == 3 && yCord == 0)
- {
- }
- //-1,0
- if (xCord == -1 && yCord == 0)
- {
- }
- //-2,0
- if (xCord == -2 && yCord == 0)
- {
- }
- //-3,0
- if (xCord == -3 && yCord == 0)
- {
- }
- //1,1
- if (xCord == 1 && yCord == 1)
- {
- }
- //2,1
- if (xCord == 2 && yCord == 1)
- {
- }
- //3,1
- if (xCord == 3 && yCord == 1)
- {
- }
- //-1,1
- if (xCord == -1 && yCord == 1)
- {
- }
- //-2,1
- if (xCord == -2 && yCord == 1)
- {
- }
- //-3,1
- if (xCord == -3 && yCord == 1)
- {
- }
- //1,2
- if (xCord == 1 && yCord == 2)
- {
- }
- //2,2
- if (xCord == 2 && yCord == 2)
- {
- }
- //3,2
- if (xCord == 3 && yCord == 2)
- {
- }
- //-1,2
- if (xCord == -1 && yCord == 2)
- {
- }
- //-2,2
- if (xCord == -2 && yCord == 2)
- {
- }
- //-3,2
- if (xCord == -3 && yCord == 2)
- {
- }
- //1,3
- if (xCord == 1 && yCord == 3)
- {
- }
- //2,3
- if (xCord == 2 && yCord == 3)
- {
- }
- //3,3
- if (xCord == 3 && yCord == 3)
- {
- }
- //-1,3
- if (xCord == -1 && yCord == 3)
- {
- }
- //-2,3
- if (xCord == -2 && yCord == 3)
- {
- }
- //-3,3
- if (xCord == -3 && yCord == 3)
- {
- }
- //1,-1
- if(xCord == 1 && yCord == -1)
- {
- }
- //2,-1
- if (xCord == 2 && yCord == -1)
- {
- }
- //3,-1
- if (xCord == 3 && yCord == -1)
- {
- }
- //-1,-1
- if (xCord == -1 && yCord == -1)
- {
- }
- //-2,-1
- if (xCord == -2 && yCord == -1)
- {
- }
- //-3,-1
- if (xCord == -3 && yCord == -1)
- {
- }
- //1,-2
- if (xCord == 1 && yCord == -2)
- {
- }
- //2,-2
- if (xCord == 2 && yCord == -2)
- {
- }
- //3,-2
- if (xCord == 3 && yCord == -2)
- {
- }
- //-1,-2
- if (xCord == -1 && yCord == -2)
- {
- }
- //-2,-2
- if (xCord == -2 && yCord == -2)
- {
- }
- //-3,-2
- if (xCord == -3 && yCord == -2)
- {
- }
- //1,-3
- if (xCord == 1 && yCord == -3)
- {
- }
- //2,-3
- if (xCord == 2 && yCord == -3)
- {
- }
- //3,-3
- if (xCord == 3 && yCord == -3)
- {
- }
- //-1,-3
- if (xCord == -1 && yCord == -3)
- {
- }
- //-2,-3
- if (xCord == -2 && yCord == -3)
- {
- }
- //-3,-3
- if (xCord == -3 && yCord == -3)
- {
- }
- //0,3
- if (xCord == 0 && yCord == 3)
- {
- }
- //0,2
- if (xCord == 0 && yCord == 2)
- {
- }
- //0,1
- if (xCord == 0 && yCord == 1)
- {
- }
- //0,0
- if (xCord == 0 && yCord == 0)
- {
- }
- //0,-1
- if (xCord == 0 && yCord == -1)
- {
- }
- //0,-2
- if (xCord == 0 && yCord == -2)
- {
- }
- //0,-3
- if (xCord == 0 && yCord == -3)
- {
- }
- //BOUNDARIES:
- //RIGHT
- if (xCord == 4)
- {
- Console.WriteLine("This area doesn't exist.");
- xCord = xCord - 1;
- }
- //LEFT
- if (xCord == -4)
- {
- Console.WriteLine("This area doesn't exist.");
- xCord = xCord + 1;
- }
- //TOP
- if (yCord == 4)
- {
- Console.WriteLine("This area doesn't exist.");
- yCord = yCord - 1;
- }
- //BOTTOM
- if (yCord == -4)
- {
- Console.WriteLine("This area doesn't exist.");
- yCord = yCord + 1;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement