anchor.diff:          _ ->
               NbrMines = nbr(mines, F, Fields),
               Fields1 = array:set(Seq, F#field{status=uncovered}, Fields),
  -            Events1 = [{uncover, Seq, {empty, NbrMines}} | Events],
  +            Events1 = [{uncovered, Seq, {empty, NbrMines}} | Events],
               Board1 = Board#board{n_hidden = NH-1, fields = Fields1},
               case NbrMines of
                   0 -> % no mines nearby -- recursively uncover neighbours:
  
positive.code:     Board = new_game(4, 4, 4, [0,2,3,8]),
      {Events, #board{n_hidden = NHidden}} = step({2,2}, Board),
      ?assertEqual(7, NHidden),
      ?assertMatch([{uncover, 15, {empty, 0}},
                    {uncover, 13, {empty, 1}},
                    {uncover, 14, {empty, 0}},
                    {uncover, 11, {empty, 0}},
                    {uncover,  9, {empty, 1}},
                    {uncover,  7, {empty, 2}},
                    {uncover,  6, {empty, 2}},
                    {uncover,  5, {empty, 3}},
                    {uncover, 10, {empty, 0}}], Events).
  
  step_on_hole2_test() ->
      %%  *0, 1,*2,*3
  
negative.code: %% - if it is covered or questioned, it will become flagged.
  %% - if it is flagged, it will become covered.
  %% - if it is uncovered, nothing happens.
  flag(Pos, #board{dims = Dims} = Board) ->
      Seq = pos2seq(Pos, Dims),
      board_event(flag, Seq, Board, []).
  
  %% toggle the question mark on a covered field
  %% - if it is covered or flagged, it will become questioned.
  %% - if it is questioned, it will become covered.
  %% - if it is uncovered, nothing happens.
  question(Pos, #board{dims = Dims} = Board) ->
      Seq = pos2seq(Pos, Dims),
      board_event(question, Seq, Board, []).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% Internal functions
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  board_event(flag, Seq, #board{fields = Fields} = Board, Events) ->
      F = array:get(Seq, Fields),
      case F#field.status of
          flagged ->
              update_field_status(covered, Seq, Board, Events);
          St when St == covered; St == questioned ->
              update_field_status(flagged, Seq, Board, Events);
          _ -> {Events, Board}
      end;
  board_event(question, Seq, #board{fields = Fields} = Board, Events) ->
      F = array:get(Seq, Fields),
      case F#field.status of
          questioned ->
              update_field_status(covered, Seq, Board, Events);
          St when St == covered; St == flagged ->
              update_field_status(questioned, Seq, Board, Events);
          _ -> {Events, Board}
      end;
  %% stepped on a field -- leads to an uncover or an explode on the same field
  board_event(step, Seq, #board{fields = Fields} = Board, Events) ->
      case array:get(Seq, Fields) of
          #field{has_mine = true, status = St} when St /= uncovered ->
  