コード例 #1
0
        public CreateSessionData(string name, string description,
			int minPlayers, int maxPlayers, int maxSpectators,
			string playerPassword, string spectatorPassword, bool shufflePlayers,
			bool dodgeCity, bool highNoon,
			bool fistfulOfCards, bool wildWestShow)
            : this()
        {
            Name = name;
            Description = description;
            MinPlayers = minPlayers;
            MaxPlayers = maxPlayers;
            MaxSpectators = maxSpectators;
            PlayerPassword = new Password(playerPassword);
            SpectatorPassword = new Password(spectatorPassword);
            ShufflePlayers = shufflePlayers;
            DodgeCity = dodgeCity;
            HighNoon = highNoon;
            FistfulOfCards = fistfulOfCards;
            WildWestShow = wildWestShow;
        }
コード例 #2
0
ファイル: Password.cs プロジェクト: sciaopin/bang-sharp
 /// <summary>
 /// Checks if the specified password hash matches this hash.
 /// </summary>
 /// <param name="password">
 /// The password hash to be checked.
 /// </param>
 /// <returns>
 /// <c>true</c> if the password hashes match, otherwise <c>false</c>.
 /// </returns>
 public bool CheckPassword(Password password)
 {
     if(IsEmpty)
         return password.IsEmpty;
     if(password.IsEmpty)
         return false;
     return hash.SequenceEqual(password.hash);
 }