public static Variant identifierToGameType(String identifier){
  Variant result=null;
  if (identifier.indexOf(SUICIDE_IDENTIFIER) != -1) {
    result=Variant.suicide;
  }
 else   if (identifier.indexOf(BUGHOUSE_IDENTIFIER) != -1) {
    result=Variant.bughouse;
  }
 else   if (identifier.indexOf(CRAZYHOUSE_IDENTIFIER) != -1) {
    result=Variant.crazyhouse;
  }
 else   if (identifier.indexOf(STANDARD_IDENTIFIER) != -1) {
    result=Variant.standard;
  }
 else   if (identifier.indexOf(FISCHER_RANDOM_IDENTIFIER) != -1) {
    result=Variant.fischerRandom;
  }
 else   if (identifier.indexOf(WILD_IDENTIFIER) != -1) {
    result=Variant.wild;
  }
 else   if (identifier.indexOf(LIGHTNING_IDENTIFIER) != -1) {
    result=Variant.lightning;
  }
 else   if (identifier.indexOf(BLITZ_IDENTIFIER) != -1) {
    result=Variant.blitz;
  }
 else   if (identifier.indexOf(ATOMIC_IDENTIFIER) != -1) {
    result=Variant.atomic;
  }
 else   if (identifier.indexOf(LOSERS_IDENTIFIER) != -1) {
    result=Variant.losers;
  }
 else   if (identifier.indexOf(UNTIMED_IDENTIFIER) != -1) {
    result=Variant.classic;
  }
 else {
    LOG.warn("Unknown identifier " + identifier + " encountered. Assuming its classic.");
    result=Variant.classic;
  }
  return result;
}

public static Variant identifierToGameType ( String identifier ) { Variant result = null ; if ( identifier . indexOf ( SUICIDE_IDENTIFIER ) != - 1 ) { result = Variant . suicide ; } else if ( identifier . indexOf ( BUGHOUSE_IDENTIFIER ) != - 1 ) { result = Variant . bughouse ; } else if ( identifier . indexOf ( CRAZYHOUSE_IDENTIFIER ) != - 1 ) { result = Variant . crazyhouse ; } else if ( identifier . indexOf ( STANDARD_IDENTIFIER ) != - 1 ) { result = Variant . standard ; } else if ( identifier . indexOf ( FISCHER_RANDOM_IDENTIFIER ) != - 1 ) { result = Variant . fischerRandom ; } else if ( identifier . indexOf ( WILD_IDENTIFIER ) != - 1 ) { result = Variant . wild ; } else if ( identifier . indexOf ( LIGHTNING_IDENTIFIER ) != - 1 ) { result = Variant . lightning ; } else if ( identifier . indexOf ( BLITZ_IDENTIFIER ) != - 1 ) { result = Variant . blitz ; } else if ( identifier . indexOf ( ATOMIC_IDENTIFIER ) != - 1 ) { result = Variant . atomic ; } else if ( identifier . indexOf ( LOSERS_IDENTIFIER ) != - 1 ) { result = Variant . losers ; } else if ( identifier . indexOf ( UNTIMED_IDENTIFIER ) != - 1 ) { result = Variant . classic ; } else { LOG . warn ( "Unknown identifier " + identifier + " encountered. Assuming its classic." ) ; result = Variant . classic ; } return result ; }
returns the game type constant for the specified identifier .
