Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- negotiate({make_bid, Item, Price}, S=#state{}) ->
- if
- (S#state.tradeditem == Item) ->
- do_bid(S#state.other, Item, Price),
- notice(S, "bidding $~p on ~p", [Price, Item]),
- {next_state, negotiate, S#state{ourprice=Price}};
- true ->
- io:format("~p: Cannot bid. Item ~p is not connected with any offer.~n", [S#state.name, Item]),
- {next_state, negotiate, S#state{}}
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement