import java.util.ArrayList;
public class Room {
    //a dynamically sized list, more about it in Lecture #4
    private ArrayList<Doorway> doorways;
    
    private String name;
    
    public Room(String name) {
        doorways = new ArrayList<Doorway>();
        this.name = name;
    }
    
    //add a doorway to the list of doorways
    protected void addDoorway(Doorway doorway) {
        doorways.add(doorway);
    }
    
    //return the doorway at the current index, the first doorway is doorway number 1
    public Doorway getDoorway(int i) {
        return doorways.get(i - 1);
    }
    
    public int getDoorwayCount() {
        return doorways.size();
    }
    
    public String getName() {
        return name;
    }
    
    
    
    
}