Back to project page Freebloks-Android.
The source code is released under:
GNU General Public License
If you think the Android project Freebloks-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.saschahlusiak.freebloks.controller; //from w ww. j a va2s.com public enum GameMode { GAMEMODE_2_COLORS_2_PLAYERS, GAMEMODE_4_COLORS_2_PLAYERS, GAMEMODE_4_COLORS_4_PLAYERS, GAMEMODE_DUO, GAMEMODE_JUNIOR; public static GameMode from(int ordinal) { for (GameMode gm: GameMode.values()) if (gm.ordinal() == ordinal) return gm; throw new RuntimeException("Unknown game mode: " + ordinal); } }