java.lang.Object
com.cmiurca.saintseiyadeckbuilding.saintseiya.Game

public class Game extends Object
Game class, where the game is created
Since:
2023-02-04
  • Constructor Details

    • Game

      public Game(int playerCount)
      Constructor for Game class
      Parameters:
      playerCount - number of players in game
    • Game

      public Game()
      Constructor for Game class
  • Method Details

    • getCurrentPlayerIndex

      public int getCurrentPlayerIndex()
      Simple getter for current player index
      Returns:
      int current player index
    • setCurrentPlayerIndex

      public void setCurrentPlayerIndex(int currentPlayerIndex)
      Simple setter for current player index
      Parameters:
      currentPlayerIndex -
    • getPlayerCount

      public int getPlayerCount()
      Simple getter for number of players in game
      Returns:
      int number of players
    • setPlayerCount

      public void setPlayerCount(int playerCount)
      Simple setter for number of players in game
      Parameters:
      playerCount - number of players to set
    • getPlayers

      public ArrayList<Player> getPlayers()
      Simple getter for players in game
      Returns:
      Player[] array of players
    • getPlayMat

      public PlayMat getPlayMat()
      Simple getter for playMat in game
      Returns:
      PlayMat playMat
    • setPlayMat

      public void setPlayMat(PlayMat playMat)
      Simple setter for playMat in game
      Parameters:
      playMat - playMat to set
    • setPlayers

      public void setPlayers(ArrayList<Player> players)
      Simple setter for players in game
      Parameters:
      players - array of players to set
    • initPlayers

      public void initPlayers()
      Method to initialize players
    • startGame

      public void startGame()
      Method to start the game
    • setPlayerHero

      public void setPlayerHero(int playerIndex, Hero hero)
      Method to set the hero of a player
      Parameters:
      playerIndex - index of player
      hero - hero to set
    • setAllPlayerHero

      public void setAllPlayerHero(Hero[] heroes)
      Method to set the hero of all players
      Parameters:
      heroes -
    • setALLPlayerName

      public void setALLPlayerName(String[] names)
      Method to set the name of all players
      Parameters:
      names -
    • setPlayerName

      public void setPlayerName(int playerIndex, String name)
      Method to set the name of a player
      Parameters:
      playerIndex - index of player
      name - name to set
    • setPlayerDeck

      public void setPlayerDeck(int playerIndex, ArrayList<Card> deck)
      Method to set the deck of a player
      Parameters:
      playerIndex - index of player
      deck - arraylist deck to set
    • setAllPlayerDeck

      public void setAllPlayerDeck(ArrayList<ArrayList<Card>> decks)
      Method to set the deck of all players
      Parameters:
      decks -
    • setPlayerHand

      public void setPlayerHand(int playerIndex, ArrayList<Card> hand)
      Method to set the hand of a player
      Parameters:
      playerIndex - index of player
      hand - hand to set
    • setAllPlayerHand

      public void setAllPlayerHand(ArrayList<ArrayList<Card>> hands)
      Method to set the hand of all players
      Parameters:
      hands -
    • setPlayerDiscard

      public void setPlayerDiscard(int playerIndex, ArrayList<Card> discard)
      Method to set the discard of a player
      Parameters:
      playerIndex - index of player
      discard - discard to set
    • setAllPlayerDiscard

      public void setAllPlayerDiscard(ArrayList<ArrayList<Card>> discards)
      Method to set the discard of all players
      Parameters:
      discards -
    • setPlayerDestroyedCards

      public void setPlayerDestroyedCards(int playerIndex, ArrayList<Card> destroyedCards)
      Method to set the destroyed cards of a player
      Parameters:
      playerIndex - index of player
      destroyedCards - destroyed cards to set
    • setAllPlayerDestroyedCards

      public void setAllPlayerDestroyedCards(ArrayList<ArrayList<Card>> destroyedCards)
      Method to set the destroyed cards of all players
      Parameters:
      destroyedCards -
    • setPlayerArmor

      public void setPlayerArmor(int playerIndex)
      Method to set the Player armor
      Parameters:
      playerIndex - index of player
    • setAllPlayerArmor

      public void setAllPlayerArmor()
      Method to set the Players armors
    • setPlayerInjuredCharacters

      public void setPlayerInjuredCharacters(int playerIndex, ArrayList<Card> injuredCharacters)
      Method to set the Player injured characters
      Parameters:
      playerIndex -
      injuredCharacters -
    • setAllPlayerInjuredCharacters

      public void setAllPlayerInjuredCharacters(ArrayList<ArrayList<Card>> injuredCharacters)
      Method to set the Players injured characters
      Parameters:
      injuredCharacters -
    • setPlayMatCardLocation

      public void setPlayMatCardLocation(Card[] cardLocation)
      Method to set the cardLocation of the playMat
      Parameters:
      cardLocation - Card[] to set the playMat cardLocation
    • endGame

      public void endGame()
      Method to end the game
    • addPlayer

      public void addPlayer(Player player)
      Method to add a player to the game
      Parameters:
      player - player to add
    • removePlayer

      public void removePlayer(Player player)
      Method to remove a player from the game
      Parameters:
      player - player to remove
    • removePlayer

      public void removePlayer(int playerIndex)
      Method to remove a player from the game
      Parameters:
      playerIndex - index of player to remove
    • getPlayer

      public Player getPlayer(int playerIndex)
      Method to get a player from the game
      Parameters:
      playerIndex - index of player to get
      Returns:
      Player player
    • toString

      public String toString()
      To string method for Game
      Overrides:
      toString in class Object
      Returns:
      String representation of Game
    • nextPlayer

      public void nextPlayer()
      Method nextPlayer to set the next player as the current player