This repository has been archived by the owner on Nov 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
395 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
package sh.hell.compactchess.game; | ||
|
||
@SuppressWarnings({"WeakerAccess", "UnusedReturnValue", "unused"}) | ||
public enum Country | ||
{ | ||
AFGHANISTAN("AFG", "Afghanistan"), | ||
ABOARD_AIRCRAFT("AIR", "Aboard aircraft"), | ||
ALBANIA("ALB", "Albania"), | ||
ALGERIA("ALG", "Algeria"), | ||
ANDORRA("AND", "Andorra"), | ||
ANGOLA("ANG", "Angola"), | ||
ANTIGUA("ANT", "Antigua"), | ||
ARGENTINA("ARG", "Argentina"), | ||
ARMENIA("ARM", "Armenia"), | ||
ANTARCTICA("ATA", "Antarctica"), | ||
AUSTRALIA("AUS", "Australia"), | ||
AZERBAIJAN("AZB", "Azerbaijan"), | ||
BANGLADESH("BAN", "Bangladesh"), | ||
BAHRAIN("BAR", "Bahrain"), | ||
BAHAMAS("BHM", "Bahamas"), | ||
BELGIUM("BEL", "Belgium"), | ||
BERMUDA("BER", "Bermuda"), | ||
BOSNIA_AND_HERZEGOVINA("BIH", "Bosnia and Herzegovina"), | ||
BELARUS("BLA", "Belarus"), | ||
BULGARIA("BLG", "Bulgaria"), | ||
BELIZE("BLZ", "Belize"), | ||
BOLIVIA("BOL", "Bolivia"), | ||
BARBADOS("BRB", "Barbados"), | ||
BRAZIL("BRS", "Brazil"), | ||
BRUNEI("BRU", "Brunei"), | ||
BOTSWANA("BSW", "Botswana"), | ||
CANADA("CAN", "Canada"), | ||
CHILE("CHI", "Chile"), | ||
COLUMBIA("COL", "Columbia"), | ||
COSTA_RICA("CRA", "Costa Rica"), | ||
CROATIA("CRO", "Croatia"), | ||
CZECHOSLOVAKIA("CSR", "Czechoslovakia"), | ||
CUBA("CUB", "Cuba"), | ||
CYPRUS("CYP", "Cyprus"), | ||
DENMARK("DEN", "Denmark"), | ||
DOMINICAN_REPUBLIC("DOM", "Dominican Republic"), | ||
ECUADOR("ECU", "Ecuador"), | ||
EGYPT("EGY", "Egypt"), | ||
ENGLAND("ENG", "England"), | ||
SPAIN("ESP", "Spain"), | ||
ESTONIA("EST", "Estonia"), | ||
FAROE_ISLANDS("FAI", "Faroe Islands"), | ||
FIJI("FIJ", "Fiji"), | ||
FINLAND("FIN", "Finland"), | ||
FRANCE("FRA", "France"), | ||
GAMBIA("GAM", "Gambia"), | ||
GUERNSEY_JERSEY("GCI", "Guernsey-Jersey"), | ||
GEORGIA("GEO", "Georgia"), | ||
GERMANY("GER", "Germany"), | ||
GHANA("GHA", "Ghana"), | ||
GREECE("GRC", "Greece"), | ||
GUATEMALA("GUA", "Guatemala"), | ||
GUYANA("GUY", "Guyana"), | ||
HAITI("HAI", "Haiti"), | ||
HONG_KONG("HKG", "Hong Kong"), | ||
HONDURAS("HON", "Honduras"), | ||
HUNGARY("HUN", "Hungary"), | ||
INDIA("IND", "India"), | ||
IRELAND("IRL", "Ireland"), | ||
IRAN("IRN", "Iran"), | ||
IRAQ("IRQ", "Iraq"), | ||
ICELAND("ISD", "Iceland"), | ||
ISRAEL("ISR", "Israel"), | ||
ITALY("ITA", "Italy"), | ||
IVORY_COAST("IVO", "Ivory Coast"), | ||
JAMAICA("JAM", "Jamaica"), | ||
JAPAN("JAP", "Japan"), | ||
JORDAN("JRD", "Jordan"), | ||
YUGOSLAVIA_JUG("JUG", "Yugoslavia"), | ||
KAZAKHSTAN("KAZ", "Kazakhstan"), | ||
KENYA("KEN", "Kenya"), | ||
KYRGYZSTAN("KIR", "Kyrgyzstan"), | ||
KUWAIT("KUW", "Kuwait"), | ||
LATVIA("LAT", "Latvia"), | ||
LEBANON("LEB", "Lebanon"), | ||
LIBYA("LIB", "Libya"), | ||
LIECHTENSTEIN("LIC", "Liechtenstein"), | ||
LITHUANIA("LTU", "Lithuania"), | ||
LUXEMBOURG("LUX", "Luxembourg"), | ||
MALAYSIA("MAL", "Malaysia"), | ||
MAURITANIA("MAU", "Mauritania"), | ||
MEXICO("MEX", "Mexico"), | ||
MALI("MLI", "Mali"), | ||
MALTA("MLT", "Malta"), | ||
MONACO("MNC", "Monaco"), | ||
MOLDOVA("MOL", "Moldova"), | ||
MONGOLIA("MON", "Mongolia"), | ||
MOZAMBIQUE("MOZ", "Mozambique"), | ||
MOROCCO("MRC", "Morocco"), | ||
MAURITIUS("MRT", "Mauritius"), | ||
MYANMAR("MYN", "Myanmar"), | ||
NICARAGUA("NCG", "Nicaragua"), | ||
THE_INTERNET("NET", "The Internet"), | ||
NIGERIA("NIG", "Nigeria"), | ||
NETHERLANDS_ANTILLES("NLA", "Netherlands Antilles"), | ||
NETHERLANDS("NLD", "Netherlands"), | ||
NORWAY("NOR", "Norway"), | ||
NEW_ZEALAND("NZD", "New Zealand"), | ||
AUSTRIA("OST", "Austria"), | ||
PAKISTAN("PAK", "Pakistan"), | ||
PALESTINE("PAL", "Palestine"), | ||
PANAMA("PAN", "Panama"), | ||
PARAGUAY("PAR", "Paraguay"), | ||
PERU("PER", "Peru"), | ||
PHILIPPINES("PHI", "Philippines"), | ||
PAPUA_NEW_GUINEA("PNG", "Papua New Guinea"), | ||
POLAND("POL", "Poland"), | ||
PORTUGAL("POR", "Portugal"), | ||
PEOPLES_REPUBLIC_OF_CHINA("PRC", "People's Republic of China"), | ||
PUERTO_RICO("PRO", "Puerto Rico"), | ||
QATAR("QTR", "Qatar"), | ||
INDONESIA("RIN", "Indonesia"), | ||
ROMANIA("ROM", "Romania"), | ||
RUSSIA("RUS", "Russia"), | ||
SOUTH_AFRICA("SAF", "South Africa"), | ||
EL_SALVADOR("SAL", "El Salvador"), | ||
SCOTLAND("SCO", "Scotland"), | ||
AT_SEA("SEA", "At Sea"), | ||
SENEGAL("SEN", "Senegal"), | ||
SEYCHELLES("SEY", "Seychelles"), | ||
SINGAPORE("SIP", "Singapore"), | ||
SLOVENIA("SLV", "Slovenia"), | ||
SAN_MARINO("SMA", "San Marino"), | ||
ABOARD_SPACECRAFT("SPC", "Aboard spacecraft"), | ||
SRI_LANKA("SRI", "Sri Lanka"), | ||
SUDAN("SUD", "Sudan"), | ||
SURINAM("SUR", "Surinam"), | ||
SWEDEN("SVE", "Sweden"), | ||
SWITZERLAND("SWZ", "Switzerland"), | ||
SYRIA("SYR", "Syria"), | ||
THAILAND("TAI", "Thailand"), | ||
TURKMENISTAN("TMT", "Turkmenistan"), | ||
TURKEY("TRK", "Turkey"), | ||
TRINIDAD_AND_TOBAGO("TTO", "Trinidad and Tobago"), | ||
TUNISIA("TUN", "Tunisia"), | ||
UNITED_ARAB_EMIRATES("UAE", "United Arab Emirates"), | ||
UGANDA("UGA", "Uganda"), | ||
UKRAINE("UKR", "Ukraine"), | ||
UNKNOWN("UNK", "Unknown"), | ||
URUGUAY("URU", "Uruguay"), | ||
UNITED_STATES_OF_AMERICA("USA", "United States of America"), | ||
UZBEKISTAN("UZB", "Uzbekistan"), | ||
VENEZUELA("VEN", "Venezuela"), | ||
BRITISH_VIRGIN_ISLANDS("VGB", "British Virgin Islands"), | ||
VIETNAM("VIE", "Vietnam"), | ||
US_VIRGIN_ISLANDS("VUS", "U.S. Virgin Islands"), | ||
WALES("WLS", "Wales"), | ||
YEMEN("YEM", "Yemen"), | ||
YUGOSLAVIA("YUG", "Yugoslavia"), | ||
ZAMBIA("ZAM", "Zambia"), | ||
ZIMBABWE("ZIM", "Zimbabwe"), | ||
ZAIRE("ZRE", "Zaire"); | ||
|
||
public final String code; | ||
public final String name; | ||
|
||
Country(String code, String name) | ||
{ | ||
this.code = code; | ||
this.name = name; | ||
} | ||
|
||
public static Country fromCode(String code) | ||
{ | ||
for(Country country : Country.values()) | ||
{ | ||
if(country.code.equalsIgnoreCase(code)) | ||
{ | ||
return country; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
Oops, something went wrong.