public static boolean isPlayerInGroup(String otherPlayer){
  if (groupMembers == null) {
    return false;
  }
  return groupMembers.contains(otherPlayer);
}

public static boolean isPlayerInGroup ( String otherPlayer ) { if ( groupMembers == null ) { return false ; } return groupMembers . contains ( otherPlayer ) ; }
checks if the specified player is in the same group as this player
