Enum GamePhase

    • Enum Constant Detail

      • SET_GOD_LIST

        public static final GamePhase SET_GOD_LIST
        Different game phases
      • CHOOSE_GOD

        public static final GamePhase CHOOSE_GOD
      • START_PLAYER

        public static final GamePhase START_PLAYER
      • SET_COLOR

        public static final GamePhase SET_COLOR
      • SET_WORKERS

        public static final GamePhase SET_WORKERS
      • CHOOSE_WORKER

        public static final GamePhase CHOOSE_WORKER
      • PENDING

        public static final GamePhase PENDING
      • CHOOSE_ACTION

        public static final GamePhase CHOOSE_ACTION
    • Method Detail

      • values

        public static GamePhase[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GamePhase c : GamePhase.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GamePhase valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • next

        public GamePhase next()
        Gives the next GamePhase
        Returns:
        next GamePhase
      • prev

        public GamePhase prev()
        Gives the previous GamePhase
        Returns:
        previous GamePhase
      • start

        public static GamePhase start()
        Used only to start the game
        Returns:
        GamePhase as SET_GOD_LIST