--- a/src/rps_rules.erl Sat Mar 08 22:19:02 2014 +0900
+++ b/src/rps_rules.erl Sat Mar 08 23:36:15 2014 +0900
Tokens = lists:map(fun list_to_atom/1, string:tokens(Text, " ")),
parse(Tokens, #ruleinfo{}).
-parse([V1,Label,V2|T], #ruleinfo{hands=Hands, beats=Beats, loses=Loses, why=Why}) ->
+parse([H1,Label,H2|T], #ruleinfo{hands=Hands, beats=Beats, loses=Loses, why=Why}) ->
- hands=add_unique(V1, Hands),
- beats=dict:append(V1, V2, Beats),
- loses=dict:append(V2, V1, Loses),
- why=dict:store({V1, V2}, Label, Why)},
+ hands=add_unique(H1, Hands),
+ beats=dict:append(H1, H2, Beats),
+ loses=dict:append(H2, H1, Loses),
+ why=dict:store({H1, H2}, Label, Why)},