Skip to content
Permalink
master
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
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <algorithm>
#include "room_desc.h"
#include "room_2.h"
#include "room_3.h"
#include "timer.h"
using namespace std;
void findOption()
{
string option;
string option1;
getline(cin, option);
vector<string> inventory = {};
string key = "room_1_key";
if (option == "1"){
cout << room1table << endl;
inventory.push_back("room_1_key");
}else if (option == "2"){
cout << room1door << endl;
cout << " 1 ----> Insert key" << endl;
getline(cin, option1);
if (option1 == "1" ){
/*if (count(inventory.begin(), inventory.end(), key))*/
cout << "The door is open!" << endl;
cout << room2start << endl;}
/*else{
cout << "You're missing the key" << endl;}
}*/
}else{
cout << "You cant go there, please choose an alternate path" << endl;
}
}
int main()
{
char name [50];
cout << "Hello, what's your name?" << endl;
cin.getline(name, 50);
cout << "Welcome, " << name <<", to Escape the Room Game! In this game you will have to escape the room by getting to a key.\n"
"You might need to solve puzzles or you might just need to find the key inside the room. Good Luck!!!" << endl;
cout << "---------------------------------Press any key to continue---------------------------------" << endl;
cin.get();
/*Vector<string> inventory = {}*/
cout << room1start << endl;
cout << "Where do you want to go?\n"
<< " 1 ----> Table\n"
<< " 2 ----> Door"<< endl;
findOption();
cout << "Where do you want to go next?" << endl;
findOption();;
room2();
room3();
return 0;
/* if(door_code = "HELP"){
cout << room2end << endl;
*/
}