# Class AbandonedStationCard

java.lang.Object
it.polimi.ingsw.is25am31.model.cards.Card
it.polimi.ingsw.is25am31.model.cards.AbandonedStationCard

All Implemented Interfaces:
  `Serializable`

public class AbandonedStationCard extends Card
Represents a card that allows players to interact with an abandoned station in the game.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class it.polimi.ingsw.is25am31.model.cards.Card

  `id, level, name, testFlight`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbandonedStationCard(int id, int level, String name, boolean testFlight, int crewMembers, List<Good> gainedGoods, int lostDays)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `applyEffect(Player player, Context context)`
  Applies the specific card effect relative to the current game state and the passed parameters.
  `String[]`
  `getAsciiArt()`
  Generates an ASCII art representation of the card containing details such as the card name, level, optional status, and its effects.
  `int`
  `getCrewMembers()`
  Retrieves the number of crew members associated with the card.
  `int`
  `getIterations()`
  `EffectType`
  `getType()`
  `void`
  `setCardContext(Player player, Context context)`
  Method used to do things that the player may/must do before applying the effect.

  ### Methods inherited from class it.polimi.ingsw.is25am31.model.cards.Card

  `getId, isTestFlight`

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

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

- ## Constructor Details

  - ### AbandonedStationCard

    public AbandonedStationCard(int id, int level, String name, boolean testFlight, int crewMembers, List<Good> gainedGoods, int lostDays)

- ## Method Details

  - ### getCrewMembers

    public int getCrewMembers()
    Description copied from class: `Card`
    Retrieves the number of crew members associated with the card.
    Overrides:
      `getCrewMembers` in class `Card`
    Returns:
      the number of crew members for the card

  - ### getIterations

    public int getIterations()
    Overrides:
      `getIterations` in class `Card`
    Returns:
      Number of times the applyEffect method needs to be called in order to fully resolve the effect of the specific Card subclass.

  - ### getType

    public EffectType getType()
    Specified by:
      `getType` in class `Card`
    Returns:
      card type

  - ### setCardContext

    public void setCardContext(Player player, Context context)
    Method used to do things that the player may/must do before applying the effect.
    Overrides:
      `setCardContext` in class `Card`
    Parameters:
      `player` - Player setting their context.
      `context` - Map of parameters passed by the player, useful to set the context of the card.

  - ### applyEffect

    public boolean applyEffect(Player player, Context context)
    Description copied from class: `Card`
    Applies the specific card effect relative to the current game state and the passed parameters.
    Specified by:
      `applyEffect` in class `Card`
    Parameters:
      `player` - Player on whom the effect is applied.
      `context` - Map of parameters passed by the player, used to apply the effect.
    Returns:
      `true` if effect has been completely resolved for passed player, `false` otherwise.

  - ### getAsciiArt

    public String[] getAsciiArt()
    Generates an ASCII art representation of the card containing details such as the card name, level, optional status, and its effects. This representation serves as a textual description of the card, formatted line by line for display.
    Specified by:
      `getAsciiArt` in class `Card`
    Returns:
      an array of strings containing the ASCII art representation of the card