Package me.simulation.game
Interface DefaultRequired
public interface DefaultRequired
This interface represents the default required behaviors for a game entity.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intgetHp()Returns the current hit points (HP) of the entity.default intgetLevel()Returns the level of the entity.default intgetLuck()Returns the luck value of the entity.default intgetLvl()Returns the level of the entity.default intgetMaxHp()Returns the maximum hit points (HP) of the entity.default booleangetMove()Returns the movement state of the entity.default intgetRange()Returns the attack range of the entity.default booleanReturns the availability of regeneration for the entity.default booleanReturns the availability of a shield for the entity.default intReturns the strength of the entity.default booleangetSword()Returns the availability of a sword for the entity.default StringgetType()Returns the type of the entity.default intReturns the x-coordinate index of the entity.default intReturns the y-coordinate index of the entity.default voidnewIndex(int newY, int newX) Sets the new index position of the entity.voidsetMove(boolean value) Sets the movement state of the entity.
-
Method Details
-
setMove
void setMove(boolean value) Sets the movement state of the entity.- Parameters:
value- true if the entity can move, false otherwise
-
newIndex
default void newIndex(int newY, int newX) Sets the new index position of the entity.- Parameters:
newY- the new y-coordinate indexnewX- the new x-coordinate index
-
getX_index
default int getX_index()Returns the x-coordinate index of the entity.- Returns:
- the x-coordinate index
-
getY_index
default int getY_index()Returns the y-coordinate index of the entity.- Returns:
- the y-coordinate index
-
getHp
default int getHp()Returns the current hit points (HP) of the entity.- Returns:
- the current hit points
-
getMaxHp
default int getMaxHp()Returns the maximum hit points (HP) of the entity.- Returns:
- the maximum hit points
-
getLvl
default int getLvl()Returns the level of the entity.- Returns:
- the level
-
getStrength
default int getStrength()Returns the strength of the entity.- Returns:
- the strength value
-
getRange
default int getRange()Returns the attack range of the entity.- Returns:
- the attack range
-
getType
Returns the type of the entity.- Returns:
- the type
-
getLuck
default int getLuck()Returns the luck value of the entity.- Returns:
- the luck value
-
getLevel
default int getLevel()Returns the level of the entity.- Returns:
- the level
-
getMove
default boolean getMove()Returns the movement state of the entity.- Returns:
- true if the entity can move, false otherwise
-
getSword
default boolean getSword()Returns the availability of a sword for the entity.- Returns:
- true if the entity has a sword, false otherwise
-
getShield
default boolean getShield()Returns the availability of a shield for the entity.- Returns:
- true if the entity has a shield, false otherwise
-
getRegeneration
default boolean getRegeneration()Returns the availability of regeneration for the entity.- Returns:
- true if the entity has regeneration, false otherwise
-