IMHO the game should allow new comers during the first day until the point
nobody is killed.
So from my point of view the code is wrong because it prevents me joining a
already started game.
For the roles to be divided between the players you can do that just before
the first villager is killed :)
Or lynch first, divid the roles between the living and make the result final
and close the game for joing more players.
Well, at least the code properly prevents you from joining the game when
it's already started (unless is hasn't started ofcourse, then the code
is wrong)...
*LOL*