) {
Set<Integer> rooms = new HashSet<Integer>();
for(Instruction instr : instructions){
if(instr._code == Instruction.code.ENTER_DOOR){
Door subject = (Door)referenceMap.getPosition(instr._subjectId);
int[] doorRooms = subject.getRoomIds();
rooms.add(doorRooms[0]);
rooms.add(doorRooms[1]);
}
}