fn top(&self, room: usize) -> u8 {
        debug_assert!(0 < room && room < 5);
        for seat in 0..DEPTH {
            let amphipod = self.room(room, seat);
            if amphipod != 0 {
                return amphipod;
            }
        }
        panic!(
            "Tried to get top amphipod in room {} but there were none",
            room
        );
    }
// Returns the top amphipod in the room.
// You should only need to call this if you already made sure that there
// are foreign amphipods in the room.
Returns the top amphipod in the room.
You should only need to call this if you already made sure that there
are foreign amphipods in the room.
Returns the top amphipod in the room . You should only need to call this if you already made sure that there are foreign amphipods in the room .
fn top(&self, room: usize) -> u8 {
        debug_assert!(0 < room && room < 5);
        for seat in 0..DEPTH {
            let amphipod = self.room(room, seat);
            if amphipod != 0 {
                return amphipod;
            }
        }
        panic!(
            "Tried to get top amphipod in room {} but there were none",
            room
        );
    }
fn top ( & self , room : usize ) -> u8 { debug_assert ! ( 0 room room 5 ) ; for seat in 0 .. DEPTH { let amphipod = self . room ( room , seat ) ; if amphipod != 0 { return amphipod ; } } panic ! ( " " room ) ; }
Returns the top amphipod in the room.
Returns the top amphipod in the room .
&self
room
usize