Anton Shestakov <engored@ya.ru>, Mon, 03 Mar 2014 15:09:55 +0900
Make rps_nickserv a gen_server.
src/rps3.erl
Permissions: -rw-r--r--
-export([get_rules/0, winning_hand/1]). get_rules() -> [rock, paper, scissors]. beats(H, lists:reverse(get_rules())). % rock, rock, rock -> rock % rock, paper, scissors -> undefined % rock, paper, paper -> paper % rock, rock, paper -> paper HSet = sets:from_list(Hands), case sets:is_element(loses(Hand), HSet) of