DeployedUnit constructor
DeployedUnit({
- required UnitCard card,
- int damage = 0,
- bool exhausted = false,
- List<
UpgradeCard> upgrades = const [],
Creates a deployed unit with the given properties.
Errors
This class is not intended to be used with user-provided input, and as such does not provide any error handling. If any of the fields are invalid, an error will be thrown.
Implementation
factory DeployedUnit({
required UnitCard card,
int damage = 0,
bool exhausted = false,
List<UpgradeCard> upgrades = const [],
}) {
return DeployedUnit._(
card: card,
damage: damage,
exhausted: exhausted,
upgrades: upgrades,
);
}