fn value_at(&self, loc: Location) -> Option<char> {
        if self.execution_mode == Mode::Exited {
            return None
        }

        if self.grid_updates.contains_key(&loc) {
            return Some(self.grid_updates[&loc]);
        }
        let ydim = self.initial_grid.len();
        if ydim <= loc.y {
            return None;
        }

        let xdim = self.initial_grid[loc.y].len();
        if xdim <= loc.x {
            return None;
        }

        Some(self.initial_grid[loc.y][loc.x])
    }
// value_at - returns the value at a given location
returns the value at a given location
returns the value at a given location
fn value_at(&self, loc: Location) -> Option<char> {
        if self.execution_mode == Mode::Exited {
            return None
        }
        if self.grid_updates.contains_key(&loc) {
            return Some(self.grid_updates[&loc]);
        }
        let ydim = self.initial_grid.len();
        if ydim <= loc.y {
            return None;
        }
        let xdim = self.initial_grid[loc.y].len();
        if xdim <= loc.x {
            return None;
        }
        Some(self.initial_grid[loc.y][loc.x])
    }
fn value_at ( & self , loc : Location ) -> Option < char > { if self . execution_mode == Mode :: Exited { return None } if self . grid_updates . contains_key ( & loc ) { return Some ( self . grid_updates [ & loc ] ) ; } let ydim = self . initial_grid . len ( ) ; if ydim <= loc . y { return None ; } let xdim = self . initial_grid [ loc . y ] . len ( ) ; if xdim <= loc . x { return None ; } Some ( self . initial_grid [ loc . y ] [ loc . x ] ) }
value_at - returns the value at a given location
value_at - returns the value at a given location
&self
loc
Location
&self
loc
Location