Skip to content

Commit

Permalink
Changed the enum values to match official naming
Browse files Browse the repository at this point in the history
Changed the enumerator names to match the internal naming used in the game code, added JavaDoc comments with a human friendly naming and included a lower boundary check for the BuildPlatform.from method
  • Loading branch information
ApocalypsjeNL committed Oct 23, 2023
1 parent 1288f48 commit 9c13ca7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,49 @@
public enum BuildPlatform {

UNDEFINED,
ANDROID,
/**
* Android
*/
GOOGLE,
IOS,
/**
* Mac OS
*/
OSX,
/**
* Kindle, FireTV
*/
AMAZON,
GEAR_VR,
HOLOLENS,
/**
* Windows Store version
*/
UWP,
/**
* Educational edition
*/
WIN_32,
DEDICATED,
APPLE_TV,
PLAYSTATION,
NINTENDO_SWITCH,
/**
* Apple TV
*/
TV_OS,
/**
* Playstation
*/
SONY,
/**
* Nintendo Switch
*/
NX,
XBOX,
WINDOWS_PHONE;
WINDOWS_PHONE,
LINUX;

private static final BuildPlatform[] VALUES = values();

public static BuildPlatform from(int id) {
return id < VALUES.length ? VALUES[id] : VALUES[0];
return id > 0 && id < VALUES.length ? VALUES[id] : VALUES[0];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
public enum UserInterfaceProfile {

CLASSIC,
POCKET;
POCKET,
NONE;

private static final UserInterfaceProfile[] VALUES = values();

Expand Down

0 comments on commit 9c13ca7

Please sign in to comment.