Example #1
0
        public void OnJoin(Join join)
        {
            pipes[join.UserName] = currentPipe;
            join.Apply(world);
            var message  = join.ToString();
            var response = new CreateWorld(world).ToString();

            ForEachUserPipe((username, pipe) =>
            {
                if (username == join.UserName)
                {
                    pipe.SendMessage(response);
                }
                else
                {
                    pipe.SendMessage(message);
                }
            });
        }
Example #2
0
 public void OnJoin(Join join)
 {
     join.Apply(world);
 }