anchor.diff:                            <<"take">> => cmd_get,
                             <<"quit">> => cmd_quit,
                             <<"exit">> => cmd_exit}).
  +
  +%% Initial locations of all objects in the game. Items in the
  +%% inventory are marked by special location indicated by atom 'body'.
  +-define(OBJECTS, #{ key => c }).
   
   %%%===================================================================
   %%% API
  
positive.code: cmd_look(_Cmd, [], State, Reply) ->
      AddMessage = fun (Message, Acc) -> add_reply_text(Message, [], Acc) end,
      SkipEmptyString = fun (Str) -> Str =/= undefined end,
      {State, lists:foldl(AddMessage, Reply,
                          lists:filter(SkipEmptyString,
                                       [ describe_room(State)
                                       , describe_objects(State)
                                       ]))};
  cmd_look(_Cmd, _Args, State, Reply) ->
  
negative.code: 
  %% @doc Try to move in the direction specified by the player.
  -spec cmd_go(Cmd :: binary(), Args :: [binary()], State :: state(), Reply :: reply()) -> {state(), reply()}.
  cmd_go(_Cmd, [<<"n">>], #{location := a, objects := #{key := KeyLocation} } = State, Reply)
    when KeyLocation =/= body ->
      {State, add_reply_text("A strong iron door is blocking the way in that direction", Reply)};
  cmd_go(_Cmd, [Direction], #{location_edges := LocationEdges} = State, Reply) ->
      case maps:find(Direction, LocationEdges) of
          {ok, NewLocation} ->
              State1 = move_to(NewLocation, State),
              cmd_look(<<"look">>, [], State1, Reply);
          error ->
              {State, add_reply_error("Unknown direction: ~s", [Direction], Reply)}
      end;
  cmd_go(_Cmd, _Direction, State, Reply) ->
      {State, add_reply_error("Usage: go <direction>", Reply)}.
  
  %% @doc Try to move the named object from the world to the player's inventory.
  -spec cmd_get(Cmd :: binary(), Args :: [binary()], State :: state(), Reply :: reply()) -> {state(), reply()}.
  