Exemple #1
0
 public bool TryAdd(UserState user)
 {
     if ((user == null) || (string.IsNullOrEmpty(user.Login)))
     {
         return(false);
     }
     if (_file.State.Users.ContainsKey(user.Login))
     {
         return(false);
     }
     _file.State.Users.Add(user.Login, user);
     _file.Save();
     return(true);
 }
Exemple #2
0
 public GameState Save(UserState user, GameState state)
 {
     _file.State.States[user.Login] = state;
     _file.Save();
     return(state);
 }