fn movements_result(&self, origin: &Coord) -> (Coord, Vec<Coord>) {
        let mut current_pos = *origin;
        let mut newly_visited = Vec::new();
        for action in self.deref() {
            let (new_pos, visited) = action.movement_result(&current_pos);
            current_pos = new_pos;
            newly_visited.extend(visited);
        }

        (current_pos, newly_visited)
    }
// cond: the movements in self conform a valid sequence from origin
// ret: (destination coord, newly visited coords) for the entire sequence
the movements in self conform a valid sequence from origin
ret: (destination coord, newly visited coords) for the entire sequence
the movements in self conform a valid sequence from origin ret : ( destination coord newly visited coords ) for the entire sequence
fn movements_result(&self, origin: &Coord) -> (Coord, Vec<Coord>) {
        let mut current_pos = *origin;
        let mut newly_visited = Vec::new();
        for action in self.deref() {
            let (new_pos, visited) = action.movement_result(&current_pos);
            current_pos = new_pos;
            newly_visited.extend(visited);
        }
        (current_pos, newly_visited)
    }
fn movements_result ( & self , origin : & Coord ) -> ( Coord , Vec < Coord > ) { let mut current_pos = * origin ; let mut newly_visited = Vec :: new ( ) ; for action in self . deref ( ) { let ( new_pos , visited ) = action . movement_result ( & current_pos ) ; current_pos = new_pos ; newly_visited . extend ( visited ) ; } ( current_pos , newly_visited ) }
cond: the movements in self conform a valid sequence from origin
ret: (destination coord, newly visited coords) for the entire sequence
cond : the movements in self conform a valid sequence from origin ret : ( destination coord newly visited coords ) for the entire sequence
&self
origin
&Coord
&self
origin
&Coord