/* Authors: Julie */
	// this is what happens when u do player->room
	public static void movePlayerToRoom(Object room) {
		if (room instanceof Room) {
			currentRoom = (Room) room;
		}
		else {
			Room update = roomMap.get(room);
			currentRoom = update;
		}

	}
	
	// Prompts player for input and sets global var "input" to whatever player submitted, provided it's a valid input. 
	// If invalid inputs are entered, it'll reprompt until player enters a valid input.
	
	// Arguments:
	// String[] acceptableInputs -- the list of acceptable inputs
	public static void promptForInput(String[] acceptableInputs) {
		System.out.println("Choose from one of the following options:");
		for (String option : acceptableInputs) {
			System.out.print(option + "    ");
		}
		System.out.println();
		// loop until player enters valid input

		input = scanner.nextLine();
		System.out.println("Input: " + input);
		while(!Arrays.asList(acceptableInputs).contains(input)) {
			System.out.println("Invalid Input. Try again.");
			input = scanner.nextLine();
			System.out.println("Input: " + input);

		}
		System.out.println();
		System.out.println();				

	}

	// Gets all the adjacencies for the room entered as argument and displays these adjacencies to player.
	// Prompts player for input and sets global var "input" to whatever player submitted, provided it's a valid adjacency.
	// If invalid inputs are entered, it'll reprompt until player enters a valid input.
	// pretty much exactly same as promptForInputs(), except it takes in a room as an argument instead of a list of strings
		public static void getInputAdjacentRooms(Room room) {
		String[] acceptableInputs = new String[room.adjRooms.size()];
		int i = 0;
		for(Room r : room.adjRooms) {
			acceptableInputs[i] = r.name;
			i++;
		}

		System.out.println("Choose from one of the following options:");
		for (String option : acceptableInputs) {
			System.out.print(option + "    ");
		}
		System.out.println();

		// loop until player enters valid input
		input = scanner.nextLine();
		System.out.println("Input: " + input);
		while(!Arrays.asList(acceptableInputs).contains(input)) {
			System.out.println("Invalid Input. Try again.");
			input = scanner.nextLine();
			System.out.println("Input: " + input);

		}
		System.out.println();
		System.out.println();		
	}
