Class JailCard

java.lang.Object
com.mygdx.game.Logic.Cards.Card
com.mygdx.game.Logic.Cards.JailCard

public class JailCard
extends Card
Card Type that implements the Go To Jail card function
  • Field Summary

    Fields inherited from class com.mygdx.game.Logic.Cards.Card

    description
  • Constructor Summary

    Constructors
    Constructor Description
    JailCard​(java.lang.String description)  
  • Method Summary

    Modifier and Type Method Description
    void runAction​(Player aPlayer)
    To be called after the user has been shown the card.
    void setSquare​(Board board)  

    Methods inherited from class com.mygdx.game.Logic.Cards.Card

    getDescription

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JailCard

      public JailCard​(java.lang.String description)
  • Method Details

    • runAction

      public void runAction​(Player aPlayer)
      To be called after the user has been shown the card.
      Removes 2 turns from the player and moves them to the prison
      Specified by:
      runAction in class Card
      Parameters:
      aPlayer - The current Player
    • setSquare

      public void setSquare​(Board board)
      Parameters:
      board - To be called before passing card to the UI. Traslates numeric pointer of square to a Square object