Get the state of a grid

Return the state of a grid; test Grid.getState.