anchor.diff:  
       Panel = wxPanel:new(Frame, []),
       Bitmap = wxBitmap:new(16 * Cols, 16 * Rows),
  +    Board = create_and_draw_board(Config, Bitmap),
   
       wxPanel:connect(Panel, left_up, [{userData, dummy}]),
       wxPanel:connect(Panel, middle_up, [{userData, dummy}]),
       wxPanel:connect(Panel, right_up, [{userData, dummy}]),
       wxPanel:connect(Panel, paint, [callback]),
       wxPanel:connect(Panel, key_up),
  -
  -    Board = board:new(Rows, Cols, Mines),
  -    [draw_icon(Bitmap, covered, {Px, Py}) || Px <- lists:seq(0, Rows-1),
  -                                             Py <- lists:seq(0, Cols-1)],
   
       wxFrame:centerOnScreen(Frame),
       wxFrame:show(Frame),
  
positive.code: -behaviour(wx_object).
  
  %% Client API
  -export([ start_link/3
          , stop/1
          ]).
  
  
negative.code: %% Local functions
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  do_move(#state{solver_state=newgame}=State) ->
      newgame(State);
  do_move(#state{solver_state=SState, board=Board}=State) ->
      {NewSState, Events, NewBoard} = solver:step(SState, Board),
      lists:foreach(fun(E) -> draw_event(E, State) end, Events),
      refresh(State),
      %io:format("Events: ~p~n", [Events]),
      {noreply, State#state{solver_state=NewSState, board=NewBoard}}.
  
  create_and_draw_board({Rows, Cols, Mines}, Bitmap) ->
      Board = board:new(Rows, Cols, Mines),
      [draw_icon(Bitmap, covered, {Px, Py}) || Px <- lists:seq(0, Rows-1),
                                               Py <- lists:seq(0, Cols-1)],
      Board.
  
  newgame(#state{bitmap=Bitmap, config=Config} = State) ->
      Board = create_and_draw_board(Config, Bitmap),
      refresh(State),
      {noreply, State#state{board=Board, solver_state=flag}}.
  
  solver_event(Fun, #state{board=Board}=State) ->
      {Events, NewBoard} = solver:Fun(Board),
      lists:foreach(fun(E) -> draw_event(E, State) end, Events),
      refresh(State),
      %io:format("Events: ~p~n", [Events]),
      {noreply, State#state{board=NewBoard}}.
  
  