public int getCurrentRoom(Point playerPos) {
		Integer currentRoom = 0;
		
		//It looks trough every room and compares their location in the level to the players.
		for (int i = 0; i < getRoomList().size(); i++) {		
			if(playerPos.getX() >= getRoomList().get(i).getPos().getX() && playerPos.getX() <= (getRoomList().get(i).getPos().getX() + getRoomList().get(i).getDx()) && playerPos.getY() >= getRoomList().get(i).getPos().getY() && playerPos.getY() <= (getRoomList().get(i).getPos().getY() + getRoomList().get(i).getDy())){
				currentRoom = i;
			}			
		}
		
		//The room number is the returned out of the function.
		return currentRoom;
	}