package pathgame.gameplay; /** * A container for holding all player abilities * * @author julia */ public class PlayerAbilities { private final String name; private final int fasterGrass; private final int fasterForest; private final int fasterShallowWater; private final int fasterDeepWater; private final int fasterHill; private final int fasterMountain; private final int fasterSwamp; /** * Contructor initializing new player abilities * * @param name name of the character type with this specific abilities * @param fasterGrass the energyCostsPoints the player can move faster on * grass tiles * @param fasterForest the energyCostsPoints the player can move faster on * forest tiles * @param fasterShallowWater the energyCostsPoints the player can move * faster on shallow water tiles * @param fasterDeepWater the energyCostsPoints the player can move faster * on deep water tiles * @param fasterHill the energyCostsPoints the player can move faster on * hill tiles * @param fasterMountain the energyCostsPoints the player can move faster on * mountain tiles * @param fasterSwamp the energyCostsPoints the player can move faster on * swamp tiles */ public PlayerAbilities(String name, int fasterGrass, int fasterForest, int fasterShallowWater, int fasterDeepWater, int fasterHill, int fasterMountain, int fasterSwamp) { this.name = name; this.fasterGrass = fasterGrass; this.fasterForest = fasterForest; this.fasterShallowWater = fasterShallowWater; this.fasterDeepWater = fasterDeepWater; this.fasterHill = fasterHill; this.fasterMountain = fasterMountain; this.fasterSwamp = fasterSwamp; } public final static PlayerAbilities NORMAL = new PlayerAbilities("Normal", 0, 0, 0, 0, 0, 0, 0); public final static PlayerAbilities HIKER = new PlayerAbilities("Hiker", 0, 0, 0, 0, 2, 4, 0); public final static PlayerAbilities HUNTER = new PlayerAbilities("Hunter", 0, 1, 0, 0, 0, 0, 1); public final static PlayerAbilities SWIMMER = new PlayerAbilities("Swimmer", 0, 0, 3, 0, 0, 0, 0); public final static PlayerAbilities SAILOR = new PlayerAbilities("Sailor", 0, 0, 0, 1, 0, 0, 0); /** * Array of all character types */ public final static PlayerAbilities[] ABILITIES = new PlayerAbilities[] { NORMAL, HIKER, HUNTER, SWIMMER, SAILOR }; /** * Returns the energyCostPoints the player is faster on grass tiles * * @return the energyCostPoints the player is faster on grass tiles */ public int getFasterGrass() { return fasterGrass; } /** * Returns the energyCostPoints the player is faster on forest tiles * * @return the energyCostPoints the player is faster on forest tiles */ public int getFasterForest() { return fasterForest; } /** * Returns the energyCostPoints the player is faster on shallow water tiles * * @return the energyCostPoints the player is faster on shallow water tiles */ public int getFasterShallowWater() { return fasterShallowWater; } /** * Returns the energyCostPoints the player is faster on deep water tiles * * @return the energyCostPoints the player is faster on deep water tiles */ public int getFasterDeepWater() { return fasterDeepWater; } /** * Returns the energyCostPoints the player is faster on hill tiles * * @return the energyCostPoints the player is faster on hill tiles */ public int getFasterHill() { return fasterHill; } /** * Returns the energyCostPoints the player is faster on mountain tiles * * @return the energyCostPoints the player is faster on mountain tiles */ public int getFasterMountain() { return fasterMountain; } /** * Returns the energyCostPoints the player is faster on swamp tiles * * @return the energyCostPoints the player is faster on swamp tiles */ public int getFasterSwamp() { return fasterSwamp; } /** * Returns the name of the current character type * * @return the name of the current character type */ public String getName() { return name; } }