예제 #1
0
string loadRoom(Room room, vector<Item> gameItems, vector<Container> gameContainers, vector<Creature> gameCreatures, vector<Item> inventory){
	cout << room.getDescription() << endl;
	string command;
	int in_room = 1;
	string stay = "";
	while(in_room){
		getline(cin,command);
		/*
		if(commandValid(command, room, gameItems, gameContainers, gameCreatures, inventory)){
			//executeCommand();
		}*/
		stay = executeCommand(command, room, gameItems, gameContainers, gameCreatures, inventory);
		if(stay != "stay"){
			return stay;
		}
	}
	
}
예제 #2
0
    void Maze::displayRoom(Room &room)
    {
        using std::cout;
        using std::endl;

        blankRoom();
        prepareRoom(room);

        cout << endl << endl;
        cout << endl << endl << "          " << room.getName() << endl << endl;

        for(int y = 0; y < 18; y++)
        {
            cout << "          " << workRoomM[y] << endl;
        }

        cout << endl << endl << room.getDescription() << endl;


        cout << endl << exits(room) << endl << getFlashMessage() << endl << endl;;
        cout << endl << endl << endl;

    } //end displayRoom()