Skip to content
Permalink
92524fadfe
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
74 lines (63 sloc) 2.85 KB
#include <iostream>
#include <string>
#include <menu.h>
using namespace std;
void scene1()
{
cout<< "You wake up in a dark room with a door infront of you. " << "\n" << "Nothing catches your eye however you see a piece of paper with some writing on it." << "\n";
cout<< "There is also a dusty bookshelf you don't see anything on it" << "\n" << "\n";
cout<< "If you would like to look at the piece of paper type 'look at piece of paper' or type '1'. " << "\n";
cout<< "If you want to take a closer look at the bookshelf 'look at bookshelf' or type '2'. " << "\n";
cout<< "If you want to open the door type 'open door' or type '3'. " << "\n" << "\n";
}
void pieceofpaper()
{
cout<< "You pick up the piece of paper." << "\n" << "The writing on the piece of paper is written very badly, but you can just about make out what it says." << "\n";
cout<< "It says" << "\n" << "\n" << "'Hello Sam welcome to the Big Boi Dungeon I have brought you here to help me defeat the great dragon so that I can rest in peace in the after life.'" << "\n" << "\n";
cout<< "The code for the door is 3687" << "\n";
}
void bookshelf()
{
cout<< "You take a closer look at the bookshelf, but there isn't anything on it but there are some scrribles on it that you can just about make out" << "\n" ;
cout<< "You see the numbers 3687 scratched into the wood " << "\n";
}
void opendoor()
{
cout << "You try pushing and pulling the door but it dosen't budge" << "\n";
cout << "You spot a panel on the side with a number pad" << "\n";
cout << "You hear a voice in your head 'please enter the 4 digits' " << "\n" << "\n";
}
int firstscene()
{
string doorcode = "3687";
string playerdoorcode;
scene1();
while (playerdoorcode != doorcode)
{
string choice;
getline (cin,choice);
if (choice == "1" || choice == "look at piece of paper")
{
pieceofpaper();
cout << "To go to the door type '3' or 'open door'" << "\n";
choice = " ";
}
if (choice == "2" || choice == "look at bookshelf")
{
bookshelf();
cout << "To go to the door type '3' or 'open door'" << "\n";
choice = " ";
}
if (choice == "3" || choice == "open door")
{
opendoor();
while (playerdoorcode != doorcode)
{
cin >> playerdoorcode;
cout << "A voice in your head says 'wrong anwser please try again'." << "\n" << "\n";
}
}
}
cout << "The door opens before you and in your head you hear the voice say." << "\n" << "Your name here move onward to your next challenge." << "\n";
cout << "But beware for the challanges will only get harder and harder." << "\n";
}