--- a/rps.erl Wed Feb 26 19:36:35 2014 +0900
+++ b/rps.erl Sat Mar 01 15:32:16 2014 +0900
- register(lobby, spawn(rps, lobby, [])),
- register(counter, spawn(rps, counter, [])),
- register(printer, spawn(rps, printer, [])),
- [spawn(rps, Bot, []) || Bot <- ?BOTS].
+ register(lobby, spawn(?MODULE, lobby, [])),
+ register(counter, spawn(?MODULE, counter, [])),
+ register(printer, spawn(?MODULE, printer, [])),
+ [spawn(?MODULE, Bot, []) || Bot <- ?BOTS].
lobby(Players) when length(Players) =:= length(?BOTS) ->
- Room = spawn(rps, room, [Players]),
+ Room = spawn(?MODULE, room, [Players]),
lists:foreach(fun(Player) -> Player ! {room, Room} end, Players),