--- a/rps.erl Sun Feb 23 16:38:28 2014 +0900
+++ b/rps.erl Tue Feb 25 23:16:04 2014 +0900
lobby/0, counter/0, printer/0, room/1,
-define(RULES, [rock, paper, scissors]).
--define(BOTS, [fool, fool, fool]).
+-define(BOTS, [fool, copycat, fool]).
+ lobby ! {join, self()},
+ copycat(Room, hd(?RULES))
+copycat(Room, Choice) ->
+ Room ! {Choice, self()},
+ {winner, {NewChoice, _}} ->
+ copycat(Room, NewChoice)