--- a/rps3.erl Wed Feb 26 02:23:06 2014 +0900+++ b/rps3.erl Wed Feb 26 02:28:07 2014 +0900@@ -3,17 +3,17 @@ get_rules() -> [rock, paper, scissors]. -beats(C) ->- beats(C, get_rules()).+beats(H) ->+ beats(H, get_rules()). -beats(C, [C|Tail]) ->+beats(H, [H|Tail]) -> lists:last(Tail); -beats(C, [B,C|_]) ->+beats(H, [B,H|_]) -> B; -beats(C, [_|T]) ->- beats(C, T).+beats(H, [_|T]) ->+ beats(H, T). test_beats() -> lists:foreach(