Class Game
java.lang.Object
com.cmiurca.saintseiyadeckbuilding.saintseiya.Game
Game class, where the game is created
- Since:
- 2023-02-04
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Method to add a player to the gamevoid
endGame()
Method to end the gameint
Simple getter for current player indexgetPlayer
(int playerIndex) Method to get a player from the gameint
Simple getter for number of players in gameSimple getter for players in gameSimple getter for playMat in gamevoid
Method to initialize playersvoid
Method nextPlayer to set the next player as the current playervoid
removePlayer
(int playerIndex) Method to remove a player from the gamevoid
removePlayer
(Player player) Method to remove a player from the gamevoid
Method to set the Players armorsvoid
setAllPlayerDeck
(ArrayList<ArrayList<Card>> decks) Method to set the deck of all playersvoid
setAllPlayerDestroyedCards
(ArrayList<ArrayList<Card>> destroyedCards) Method to set the destroyed cards of all playersvoid
setAllPlayerDiscard
(ArrayList<ArrayList<Card>> discards) Method to set the discard of all playersvoid
setAllPlayerHand
(ArrayList<ArrayList<Card>> hands) Method to set the hand of all playersvoid
setAllPlayerHero
(Hero[] heroes) Method to set the hero of all playersvoid
setAllPlayerInjuredCharacters
(ArrayList<ArrayList<Card>> injuredCharacters) Method to set the Players injured charactersvoid
setALLPlayerName
(String[] names) Method to set the name of all playersvoid
setCurrentPlayerIndex
(int currentPlayerIndex) Simple setter for current player indexvoid
setPlayerArmor
(int playerIndex) Method to set the Player armorvoid
setPlayerCount
(int playerCount) Simple setter for number of players in gamevoid
setPlayerDeck
(int playerIndex, ArrayList<Card> deck) Method to set the deck of a playervoid
setPlayerDestroyedCards
(int playerIndex, ArrayList<Card> destroyedCards) Method to set the destroyed cards of a playervoid
setPlayerDiscard
(int playerIndex, ArrayList<Card> discard) Method to set the discard of a playervoid
setPlayerHand
(int playerIndex, ArrayList<Card> hand) Method to set the hand of a playervoid
setPlayerHero
(int playerIndex, Hero hero) Method to set the hero of a playervoid
setPlayerInjuredCharacters
(int playerIndex, ArrayList<Card> injuredCharacters) Method to set the Player injured charactersvoid
setPlayerName
(int playerIndex, String name) Method to set the name of a playervoid
setPlayers
(ArrayList<Player> players) Simple setter for players in gamevoid
setPlayMat
(PlayMat playMat) Simple setter for playMat in gamevoid
setPlayMatCardLocation
(Card[] cardLocation) Method to set the cardLocation of the playMatvoid
Method to start the gametoString()
To string method for Game
-
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
Simple getter for players in game- Returns:
- Player[] array of players
-
getPlayMat
Simple getter for playMat in game- Returns:
- PlayMat playMat
-
setPlayMat
Simple setter for playMat in game- Parameters:
playMat
- playMat to set
-
setPlayers
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
Method to set the hero of a player- Parameters:
playerIndex
- index of playerhero
- hero to set
-
setAllPlayerHero
Method to set the hero of all players- Parameters:
heroes
-
-
setALLPlayerName
Method to set the name of all players- Parameters:
names
-
-
setPlayerName
Method to set the name of a player- Parameters:
playerIndex
- index of playername
- name to set
-
setPlayerDeck
Method to set the deck of a player- Parameters:
playerIndex
- index of playerdeck
- arraylist deck to set
-
setAllPlayerDeck
Method to set the deck of all players- Parameters:
decks
-
-
setPlayerHand
Method to set the hand of a player- Parameters:
playerIndex
- index of playerhand
- hand to set
-
setAllPlayerHand
Method to set the hand of all players- Parameters:
hands
-
-
setPlayerDiscard
Method to set the discard of a player- Parameters:
playerIndex
- index of playerdiscard
- discard to set
-
setAllPlayerDiscard
Method to set the discard of all players- Parameters:
discards
-
-
setPlayerDestroyedCards
Method to set the destroyed cards of a player- Parameters:
playerIndex
- index of playerdestroyedCards
- destroyed cards to set
-
setAllPlayerDestroyedCards
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
Method to set the Player injured characters- Parameters:
playerIndex
-injuredCharacters
-
-
setAllPlayerInjuredCharacters
Method to set the Players injured characters- Parameters:
injuredCharacters
-
-
setPlayMatCardLocation
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
Method to add a player to the game- Parameters:
player
- player to add
-
removePlayer
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
Method to get a player from the game- Parameters:
playerIndex
- index of player to get- Returns:
- Player player
-
toString
To string method for Game -
nextPlayer
public void nextPlayer()Method nextPlayer to set the next player as the current player
-