--- a/rps.erl Sun Feb 23 00:23:54 2014 +0900
+++ b/rps.erl Sun Feb 23 00:29:31 2014 +0900
room(Players, Choices) when length(Players) =:= length(Choices) ->
- Best = winner(Choices),
+ Winner = winner(Choices),
+ Winner =:= undefined ->
io:format("draw: ~w.~n", [Choices]),
- io:format("the winner is ~w.~n", [Best]),
+ io:format("the winner is ~w.~n", [Winner]),
lists:foreach(fun(Player) -> Player ! Msg end, Players),