public class LogicalAndBattleClause extends BattleClause
BattleClause
are valid
If a single clause is not valid then it fails (returns false)Constructor and Description |
---|
LogicalAndBattleClause(java.lang.String id,
BattleClause... clauses)
Creates the clause with the given cub-clauses
|
Modifier and Type | Method and Description |
---|---|
boolean |
validateSingle(Pokemon pokemon)
Checks if the rule allows a Pokémon to be chosen for battle.
|
boolean |
validateTeam(java.util.List<Pokemon> team)
Checks if the rule allows a list of Pokémon to be chosen for battle.
|
compareTo, decodeInto, encodeInto, equals, getDescription, getID, getLocalizedName, getLocalizedName, hashCode, setDescription, toString
public LogicalAndBattleClause(java.lang.String id, BattleClause... clauses)
id
- The unique ID of the battle clause.clauses
- The clauses that cannot be violated.public boolean validateSingle(Pokemon pokemon)
BattleClause
validateSingle
in class BattleClause
pokemon
- The Pokémon to check.public boolean validateTeam(java.util.List<Pokemon> team)
BattleClause
validateTeam
in class BattleClause
team
- The Pokémon to check.