anchor.diff:      wxScreenDC:destroy(DC);
   refresh(#state{mode=interactive, frame=Frame}) ->
       wxPanel:refresh(Frame).
  +
  +icon_dc(FieldState) ->
  +    Image = wxImage:new("priv/images/" ++ icon_filename(FieldState)),
  +    Bmp = wxBitmap:new(Image),
  +    wxMemoryDC:new(Bmp).
  +
  +memoize(Fun) ->
  +    case get(Fun) of
  +        undefined ->
  +            Value = Fun(),
  +            put(Fun, Value),
  +            Value;
  +        Value ->
  +            Value
  +    end.
  
positive.code: 
  draw_event({game_over, Result}, #state{}) ->
      io:format("Game over: you ~p~n", [Result]);
  draw_event({Event, Seq}, #state{board=#board{dims=Dims},
                                  bitmap=Bitmap}) ->
      draw_icon(Bitmap, Event, board:seq2pos(Seq, Dims));
  draw_event({uncovered, Seq, Type}, #state{board=#board{dims=Dims},
                                            bitmap=Bitmap}) ->
      draw_icon(Bitmap, Type, board:seq2pos(Seq, Dims));
  draw_event(Event, _Panel) ->
      io:format("Event: ~p~n", [Event]).
  
  draw_icon(Bitmap, FieldState, {Px, Py}) ->
      Image = wxImage:new("priv/images/" ++ icon_filename(FieldState)),
      Bmp = wxBitmap:new(Image),
      SrcDC = wxMemoryDC:new(Bmp),
      DestDC = wxMemoryDC:new(Bitmap),
      wxDC:blit(DestDC, {16*Py ,16*Px}, {16, 16}, SrcDC, {0,0}),
      wxMemoryDC:destroy(SrcDC),
      wxMemoryDC:destroy(DestDC),
      wxBitmap:destroy(Bmp).
  
  %% Buffered makes it all appear on the screen at the same time
  redraw(DC, Bitmap) ->
  
negative.code:     io:format("config: ~p~n", [Config]),
      Bitmap = wxBitmap:new(16 * Cols, 16 * Rows),
      Board = create_and_draw_board(Config, Bitmap),
      State = #state{config=Config, bitmap=Bitmap, board=Board, mode=screensaver},
      Frame = wxFrame:new(Server, ?wxID_ANY, "MinesweepErl", []),
      refresh(State),
      timer:send_interval(?MOVE_INTERVAL, move),
      {Frame, State#state{frame=Frame}};
  do_init([Server, {Rows, Cols, _Mines}=Config]) ->
      Frame = wxFrame:new(Server, ?wxID_ANY, "MinesweepErl",
                          [{style,
  