SHARE
TWEET

Untitled

a guest Jan 13th, 2020 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. true ->
  2.         if OurPrice == undefined ->
  3.             do_bid(S#state.other, Item, Price),
  4.             notice(S, "bidding $~p on ~p", [Price, Item]),
  5.             {next_state, negotiate, S#state{ourprice=Price}};
  6.         OurPrice - 0.1 * FirstPrice >= Price ->
  7.             do_bid(S#state.other, Item, Price),
  8.             notice(S, "bidding $~p on ~p", [Price, Item]),
  9.             {next_state, negotiate, S#state{ourprice=Price}};
  10.         true ->
  11.             io:format("~p: Cannot set price ~p than previous one: ~p \n",[Name,Price,OurPrice]),
  12.             {next_state, negotiate, S}
  13.         end
  14.       end;
  15.     true ->
  16.       io:format("~p: Cannot bid. Item ~p is not connected with any offer.~n", [S#state.name, Item]),
  17.       {next_state, negotiate, S#state{}}
  18.   end;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top