code: public static boolean plays(Role role, String r) {
          if (r == null) {
              throw new IllegalArgumentException("null role");
          }
          if (role == null) {
              return false;
          }
          return role.value().contains(r);
      }
docs: Checks if one role is played.
  
  @param role the role to check
  @param r the expected role
  @return true or false.