# Class BatteryComponent

java.lang.Object
it.polimi.ingsw.is25am31.model.components.Component
it.polimi.ingsw.is25am31.model.components.BatteryComponent

All Implemented Interfaces:
  `Serializable`

public class BatteryComponent extends Component
Represents a component with a specific capacity for storing batteries, This class allows for modifications to its current capacity while ensuring it does not exceed its predefined limits.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class it.polimi.ingsw.is25am31.model.components.Component

  `connector, id, name, orientation, x, y`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BatteryComponent(int id, String name, Map<Side,Connector> connector, Side orientation, int maxCapacity)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `getAsciiArt()`
  Provides ASCII art representation for structural components
  `int`
  `getCapacity()`
  `int`
  `getMaxCapacity()`
  `void`
  `modifyCapacity(int change)`

  ### Methods inherited from class it.polimi.ingsw.is25am31.model.components.Component

  `activate, addContains, calculateFirePower, calculateThrust, getAlienColor, getConnector, getConnectors, getContains, getCrewMembers, getCurrentAlien, getId, getMaxGoodValue, getName, getOrientation, getOrientationShield, getPower, getX, getY, isActive, isAlienLifeSupport, isAlienStructural, modifyCrewMembers, modifyOrientation, protectedSides, removeContains, setOrientationShield, setX, setY`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BatteryComponent

    public BatteryComponent(int id, String name, Map<Side,Connector> connector, Side orientation, int maxCapacity)

- ## Method Details

  - ### modifyCapacity

    public void modifyCapacity(int change)
    Overrides:
      `modifyCapacity` in class `Component`

  - ### getCapacity

    public int getCapacity()
    Overrides:
      `getCapacity` in class `Component`

  - ### getMaxCapacity

    public int getMaxCapacity()

  - ### getAsciiArt

    public String[] getAsciiArt()
    Description copied from class: `Component`
    Provides ASCII art representation for structural components
    Overrides:
      `getAsciiArt` in class `Component`
    Returns:
      array of ASCII art lines