anchor.diff:           terminate/2, code_change/3]).
   
   %% handlers
  --export([handle_deal_command/0,
  -         handle_bet_command/1,
  -         handle_hit_command/0,
  +-export([handle_deal_command/1,
  +         handle_bet_command/2,
  +         handle_hit_command/1,
            handle_status_command/0,
            handle_credits_command/1,
            handle_stand_command/1]).
  
positive.code:         {player_won, {player, _, _, Bet}, _} -> 
              credits_server:deposit(Who, Bet);
          {house_won, {player, _, _, Bet}, _} ->
              credits_server:withdraw(Who, Bet)
      end,
      format_result(Res).
   
  
negative.code:             nani_bot:say(To, [From, ": ", Msg])
      end.
  
  handle_bet_command(Arg, Who) ->
      case try_parse_int(Arg) of
          {ok, Amount} -> 
              Res = blackjack:bet(frotz, Amount),
              case Res of 
                  {player_won, {player, _, _, Bet}, _} -> 
                      credits_server:deposit(Who, Bet);
                  {house_won, {player, _, _, Bet}, _} ->
                      credits_server:withdraw(Who, Bet);
                  _ -> ok
              end,
              format_result(Res);
          Err -> Err
      end.
  
  handle_deal_command(Who) ->
      Res = blackjack:deal(frotz),
      case Res of 
          {player_won, {player, _, _, Bet}, _} -> 
              credits_server:deposit(Who, Bet);
          {house_won, {player, _, _, Bet}, _} ->
              credits_server:withdraw(Who, Bet);
          _ -> ok
      end,
      format_result(Res).
  
  handle_hit_command(Who) ->
      Res = blackjack:hit(frotz),
      case Res of 
          {player_won, {player, _, _, Bet}, _} -> 
              credits_server:deposit(Who, Bet);
          {house_won, {player, _, _, Bet}, _} ->
              credits_server:withdraw(Who, Bet);
          _ -> ok
      end,
      format_result(Res).
  
  handle_status_command() ->
  