Anton Shestakov <engored@ya.ru>, Mon, 03 Mar 2014 15:37:24 +0900
Each room has its own set of rules.
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