added function that initializes a room from a given index (sets coord from index)