Enum Class PlayerStrategy

java.lang.Object
java.lang.Enum<PlayerStrategy>
com.bomber7.utils.PlayerStrategy
All Implemented Interfaces:
Serializable, Comparable<PlayerStrategy>, Constable

public enum PlayerStrategy extends Enum<PlayerStrategy>
Represents the different strategies that a BomberGame player's can use. Each strategy defines a different behaviour.
  • Enum Constant Details

    • HUMAN

      public static final PlayerStrategy HUMAN
      Human player.
    • PEACEFUL

      public static final PlayerStrategy PEACEFUL
      Passive AI that does not attack others.
    • BEGINNER

      public static final PlayerStrategy BEGINNER
      Basic AI with simple behavior (random moves, random bomb placement).
    • PRO

      public static final PlayerStrategy PRO
      Advanced AI (TBD).
  • Method Details

    • values

      public static PlayerStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PlayerStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • next

      public PlayerStrategy next()
      Returns the next strategy in the list, looping to the first if necessary.
      Returns:
      the next PlayerStrategy.
    • previous

      public PlayerStrategy previous()
      Returns the previous strategy in the list, looping to the last if necessary.
      Returns:
      the previous PlayerStrategy.