public static bool InRole(this MatchUser @this, MatchRole role) =>
 @this.Role == role;
 public static bool IsTurn(this Match @this, MatchRole role) =>
 @this.MatchUsers.FirstOrDefault(x => x.Role == role).CanGo;
 public static bool UserInRole(this Match @this, string userId, MatchRole role) =>
 @this.MatchUsers.Any(x => x.UserId == userId && x.Role == role);
示例#4
0
 internal MatchPlayer(int playerId, MatchRole matchRole) : this()
 {
     PlayerId  = playerId;
     MatchRole = matchRole;
 }