Gamelib/src/main/java/uulm/teamname/marvelous/gamelibrary/config/PartyConfig.java

107 lines
3.4 KiB
Java

package uulm.teamname.marvelous.gamelibrary.config;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import java.util.Objects;
/**
* POJO describing the PartyConfig as defined by the standard document
*/
public class PartyConfig {
/** Max round amount in a match */
@NotNull
@Positive
public int maxRounds;
/** Max round time in a match in seconds */
@NotNull
@Positive
public int maxRoundTime;
/** Max overall time in a match in seconds */
@NotNull
@Positive
public int maxGameTime;
/** Max time a single animation might take up in seconds */
@NotNull
@Positive
public int maxAnimationTime;
/** Cooldown of the space stone in rounds */
@NotNull
@Positive
public int spaceStoneCD;
/** Cooldown of the mind stone in rounds */
@NotNull
@Positive
public int mindStoneCD;
/** Cooldown of the reality stone in rounds */
@NotNull
@Positive
public int realityStoneCD;
/** Cooldown of the power stone in rounds */
@NotNull
@Positive
public int powerStoneCD;
/** Cooldown of the time stone in rounds */
@NotNull
@Positive
public int timeStoneCD;
/** Cooldown of the soul stone in rounds */
@NotNull
@Positive
public int soulStoneCD;
/** Damage the mind stone does when used */
@NotNull
@Positive
public int mindStoneDMG;
/** Max pause time. Optional */
@NotNull
@Positive
public int maxPauseTime;
/** Duration that the server waits for the client to respond (send a message), based on the usage of Keep-Alives */
public int maxResponseTime;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PartyConfig that = (PartyConfig) o;
return maxRounds == that.maxRounds && maxRoundTime == that.maxRoundTime && maxGameTime == that.maxGameTime && maxAnimationTime == that.maxAnimationTime && spaceStoneCD == that.spaceStoneCD && mindStoneCD == that.mindStoneCD && realityStoneCD == that.realityStoneCD && powerStoneCD == that.powerStoneCD && timeStoneCD == that.timeStoneCD && soulStoneCD == that.soulStoneCD && mindStoneDMG == that.mindStoneDMG && maxPauseTime == that.maxPauseTime && maxResponseTime == that.maxResponseTime;
}
@Override
public int hashCode() {
return Objects.hash(maxRounds, maxRoundTime, maxGameTime, maxAnimationTime, spaceStoneCD, mindStoneCD, realityStoneCD, powerStoneCD, timeStoneCD, soulStoneCD, mindStoneDMG, maxPauseTime, maxResponseTime);
}
@Override
public String toString() {
return "PartyConfig{" +
"maxRounds=" + maxRounds +
", maxRoundTime=" + maxRoundTime +
", maxGameTime=" + maxGameTime +
", maxAnimationTime=" + maxAnimationTime +
", spaceStoneCD=" + spaceStoneCD +
", mindStoneCD=" + mindStoneCD +
", realityStoneCD=" + realityStoneCD +
", powerStoneCD=" + powerStoneCD +
", timeStoneCD=" + timeStoneCD +
", soulStoneCD=" + soulStoneCD +
", mindStoneDMG=" + mindStoneDMG +
", maxPauseTime=" + maxPauseTime +
", maxResponseTime=" + maxResponseTime +
'}';
}
}