Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication2
- {
- class Program
- {
- byte PlayerAge;
- string PlayerName;
- int PlayerHealth, DamageToPlayer;
- bool PlayerDeath, PlayerHands, DoorIsOpen, KeyFromDoor;
- static void Main(string[] args)
- {
- }
- void UserInfo()
- {
- Console.Clear();
- Console.WriteLine();
- PlayerName = Console.ReadLine();
- Console.WriteLine();
- PlayerAge = Convert.ToByte(Console.ReadLine());
- Console.WriteLine();
- PlayerHealth = Convert.ToInt32(Console.ReadLine());
- }
- void UserHands()
- {
- Console.WriteLine();
- char PlayerAnswer = Convert.ToChar(Console.ReadLine().ToUpper());
- if (PlayerAnswer == 'Y')
- {
- PlayerHands = true;
- }
- else if (PlayerAnswer == 'N')
- {
- PlayerHands = false;
- }
- else
- {
- return;
- }
- }
- void UserHasKey()
- {
- Console.WriteLine();
- char PlayerAnswer = Convert.ToChar(Console.ReadLine().ToUpper());
- if (PlayerAnswer == 'Y')
- {
- KeyFromDoor = true;
- }
- else if (PlayerAnswer == 'N')
- {
- KeyFromDoor = false;
- }
- else
- {
- return;
- }
- }
- void DoorOpen()
- {
- Console.WriteLine();
- char PlayerAnswer = Convert.ToChar(Console.ReadLine().ToUpper());
- if (PlayerAnswer == 'Y')
- {
- DoorIsOpen = true;
- }
- else if (PlayerAnswer == 'N')
- {
- DoorIsOpen = false;
- }
- else
- {
- return;
- }
- }
- void UserEntrance()
- {
- if (DoorIsOpen || (PlayerHands && KeyFromDoor))
- {
- Console.WriteLine();
- }
- else
- {
- Console.WriteLine();
- }
- }
- void UserBattle()
- {
- Console.WriteLine();
- DamageToPlayer = Convert.ToInt32(Console.ReadLine());
- PlayerHealth -= DamageToPlayer;
- if (PlayerHealth <= 0)
- {
- Console.WriteLine();
- PlayerDeath = true;
- if (PlayerDeath)
- {
- PlayerName = "DeathUser";
- Console.WriteLine();
- }
- }
- else
- {
- return;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment