Download:
child 50:3f31a4eec418
parent 48:7c2bcef09311
49:5ca76c8726c5
Anton Shestakov <engored@ya.ru>, Sat, 08 Mar 2014 22:19:02 +0900
Start countdown in lobby if there are more than 1 player (was: 0).

1 файлов изменено, 3 вставок(+), 3 удалений(-) [+]
src/rps.erl file | annotate | diff | comparison | revisions
--- a/src/rps.erl Sat Mar 08 21:55:29 2014 +0900
+++ b/src/rps.erl Sat Mar 08 22:19:02 2014 +0900
@@ -25,9 +25,9 @@
lobby();
lobby(Players, Timeout) ->
- Wait = case length(Players) of
- 0 -> infinity;
- _ -> 1000
+ Wait = case length(Players) > 1 of
+ false -> infinity;
+ true -> 1000
end,
receive
{join, Who} ->