anchor.diff:              {Table2, _Took} =
                   echessd_game:ll_move(
                     Table, crd_enc(C1), crd_enc(C2)),
  -            MyKingIndex2 =
  +            MyKingIndex =
                   if Figure == ?king -> C2;
  -                   true -> MyKingIndex
  +                   true ->
  +                        whereis_my_king(History, MyColor)
                   end,
  +            %% fixme: need to use more efficient way
               Enemies = all_enemies(Table2, MyColor),
               case is_cell_under_attack(
  -                   Table2, MyKingIndex2, Enemies) of
  +                   Table2, MyKingIndex, Enemies) of
                   true ->
                       throw({error, check});
                   _ -> ok
  
positive.code:         end ++
          case cell(T, FR) of
              {_, _} -> [FR];
              _ -> []
          end;
  possible_(T, F, C, ?rook, _History) ->
  
negative.code: %% low level tools
  %% ----------------------------------------------------------------------
  
  is_en_passant([_ | _] = History, {C2, R2} = OppPawnCoord) ->
      [A, B, C, D] = lists:last(History),
      case crd_dec(C, D) of
          OppPawnCoord ->
              case crd_dec(A, B) of
                  {C2, R1} when abs(abs(R1) - abs(R2)) == 2 ->
                      true;
                  _ -> false
              end;
          _ -> false
      end;
  is_en_passant(_, _) -> false.
  
  is_empty_or_enemy(Table, MyColor, Coord) ->
      case cell(Table, Coord) of
          ?empty -> Coord;
  