Class CliDrawer

java.lang.Object
it.polimi.ingsw.view.cli.CliDrawer

public class CliDrawer
extends java.lang.Object
Class that manage the Cli representation of the game state
  • Constructor Summary

    Constructors
    Constructor Description
    CliDrawer​(ClientStateViewer state)
    Constructor for CliDrawer class
  • Method Summary

    Modifier and Type Method Description
    void displayActiveLeaders​(java.lang.String username)
    Builds and prints the active leaders of the player with the username passed as parameter
    void displayDefaultCanvas​(java.lang.String username)
    Builds, fills and prints the default representation of the game.
    void displayLeaderHand​(java.lang.String username)
    Builds and prints the leader hand of the player with the username passed as parameter
    void displayLorenzoHasDiscarded​(DevelopCardDeckUpdate discardUpdate)
    Builds, fills and prints Lorenzo track and last token flipped
    void displayLorenzoHasMoved()
    Builds, fills and prints Lorenzo track and last token flipped
    void displayLorenzoHasShuffled()
    Builds, fills and prints Lorenzo track and last token flipped
    void displayPlainCanvas()
    Prints a plain canvas
    void displayPlayerBoard​(java.lang.String username)
    Builds, fills the PlayerBoard of the player which as the username that is passed as parameter
    void displayProducibleCards()
    Builds, Fills and displays the cards on which the player can active the production on
    void displayResourcesChoice()
    Prints the four marbles associated to resources
    void drawDevelopCardDeck()
    Builds, fills and prints the DevelopCard Deck
    void marketDisplay()
    Builds, fills and prints the Market

    Methods inherited from class java.lang.Object

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

    • CliDrawer

      public CliDrawer​(ClientStateViewer state)
      Constructor for CliDrawer class
      Parameters:
      state - , contains the state of the game
  • Method Details

    • displayPlainCanvas

      public void displayPlainCanvas()
      Prints a plain canvas
    • displayDefaultCanvas

      public void displayDefaultCanvas​(java.lang.String username)
      Builds, fills and prints the default representation of the game. Default representation includes the Market, the DevelopCard Deck and the PlayerBoard of the player which as the username that is passed as parameter
      Parameters:
      username - , username of the player
    • displayPlayerBoard

      public void displayPlayerBoard​(java.lang.String username)
      Builds, fills the PlayerBoard of the player which as the username that is passed as parameter
      Parameters:
      username - , username of the player
    • marketDisplay

      public void marketDisplay()
      Builds, fills and prints the Market
    • displayLeaderHand

      public void displayLeaderHand​(java.lang.String username)
      Builds and prints the leader hand of the player with the username passed as parameter
      Parameters:
      username - , username of the player
    • displayActiveLeaders

      public void displayActiveLeaders​(java.lang.String username)
      Builds and prints the active leaders of the player with the username passed as parameter
      Parameters:
      username - , username of the player
    • displayProducibleCards

      public void displayProducibleCards()
      Builds, Fills and displays the cards on which the player can active the production on
    • displayResourcesChoice

      public void displayResourcesChoice()
      Prints the four marbles associated to resources
    • displayLorenzoHasMoved

      public void displayLorenzoHasMoved()
      Builds, fills and prints Lorenzo track and last token flipped
    • displayLorenzoHasShuffled

      public void displayLorenzoHasShuffled()
      Builds, fills and prints Lorenzo track and last token flipped
    • displayLorenzoHasDiscarded

      public void displayLorenzoHasDiscarded​(DevelopCardDeckUpdate discardUpdate)
      Builds, fills and prints Lorenzo track and last token flipped
      Parameters:
      discardUpdate - , update of the develop card Lorenzo has discarded
    • drawDevelopCardDeck

      public void drawDevelopCardDeck()
      Builds, fills and prints the DevelopCard Deck