Prevent room index from going above room_count or below 0
Added functionality between doors and rooms.