Anton Shestakov <engored@ya.ru>, Sun, 02 Mar 2014 22:08:58 +0900
Backed out changeset 44aa20fdf779: let's not change rules each round.
test/rps3_tests.erl
Permissions: -rw-r--r--
-include_lib("eunit/include/eunit.hrl"). ?assertEqual(length(rps3:get_rules()), 3). ?assertEqual(rps3:winning_hand([rock, paper]), paper), ?assertEqual(rps3:winning_hand([paper, scissors]), scissors), ?assertEqual(rps3:winning_hand([scissors, rock]), rock), ?assertEqual(rps3:winning_hand([rock, rock, rock]), rock), ?assertEqual(rps3:winning_hand([rock, paper, scissors]), undefined), ?assertEqual(rps3:winning_hand([rock, paper, paper]), paper), ?assertEqual(rps3:winning_hand([rock, rock, paper]), paper).