Uses of Class
edu.ntnu.idi.idatt.model.player.Player
Packages that use Player
Package
Description
-
Uses of Player in edu.ntnu.idi.idatt.controller.common
Fields in edu.ntnu.idi.idatt.controller.common with type parameters of type PlayerModifier and TypeFieldDescriptionprotected BiConsumer
<Board, List<Player>> MenuController.onStartGame
Consumer for handling the start game action, taking a Board and a List of Players.Methods in edu.ntnu.idi.idatt.controller.common that return types with arguments of type PlayerModifier and TypeMethodDescriptionGameController.getPlayers()
Gets the list of players in the game.MenuController.getPlayers()
Retrieves the list of players configured in the menu.Methods in edu.ntnu.idi.idatt.controller.common with parameters of type PlayerModifier and TypeMethodDescriptionabstract void
GameController.onCurrentPlayerChanged
(Player player) Called when the current player in theBoardGame
model changes.abstract void
GameController.onGameFinished
(Player winner) Called when theBoardGame
model signals that the game has finished.Method parameters in edu.ntnu.idi.idatt.controller.common with type arguments of type PlayerModifier and TypeMethodDescriptionabstract void
GameController.initializeBoardGame
(Board board, List<Player> players) Initializes the specificBoardGame
instance for the game.void
MenuController.setOnStartGame
(BiConsumer<Board, List<Player>> onStartGame) Sets the action to be performed when the game is started.Constructor parameters in edu.ntnu.idi.idatt.controller.common with type arguments of type PlayerModifierConstructorDescriptionGameController
(GameView gameView, Board board, List<Player> players) Constructs a GameController.GameFinishedController
(GameFinishedView view, List<Player> rankedPlayers) Constructor for GameFinishedController. -
Uses of Player in edu.ntnu.idi.idatt.controller.laddergame
Methods in edu.ntnu.idi.idatt.controller.laddergame that return types with arguments of type PlayerModifier and TypeMethodDescriptionLadderGameMenuController.getPlayers()
Retrieves and returns a list ofPlayer
objects based on the current data entered in the player configuration rows of theMenuController.menuView
.Methods in edu.ntnu.idi.idatt.controller.laddergame with parameters of type PlayerModifier and TypeMethodDescriptionvoid
LadderGameController.onCurrentPlayerChanged
(Player player) Handles thecurrentPlayerChanged
event from theLadderBoardGame
model.void
LadderGameController.onGameFinished
(Player winner) Handles thegameFinished
event from theLadderBoardGame
model.void
LadderGameController.onPlayerMoved
(Player player, int diceRoll, int newTileId) Handles theplayerMoved
event from theLadderBoardGame
model.void
LadderGameController.onTileActionPerformed
(Player player, TileAction tileAction) Handles thetileActionPerformed
event from theLadderBoardGame
model.Method parameters in edu.ntnu.idi.idatt.controller.laddergame with type arguments of type PlayerModifier and TypeMethodDescriptionvoid
LadderGameController.initializeBoardGame
(Board board, List<Player> players) Initializes theGameController.boardGame
instance as aLadderBoardGame
.Constructor parameters in edu.ntnu.idi.idatt.controller.laddergame with type arguments of type PlayerModifierConstructorDescriptionLadderGameController
(LadderGameView ladderGameView, Board board, List<Player> players) Constructs a newLadderGameController
. -
Uses of Player in edu.ntnu.idi.idatt.controller.ludo
Methods in edu.ntnu.idi.idatt.controller.ludo that return types with arguments of type PlayerModifier and TypeMethodDescriptionLudoMenuController.getPlayers()
Retrieves the list of players configured in the menu, creatingLudoPlayer
instances.Methods in edu.ntnu.idi.idatt.controller.ludo with parameters of type PlayerModifier and TypeMethodDescriptionvoid
LudoGameController.onCurrentPlayerChanged
(Player player) Handles thecurrentPlayerChanged
event from theLudoBoardGame
model.void
LudoGameController.onGameFinished
(Player winner) Handles thegameFinished
event from theLudoBoardGame
model.void
LudoGameController.onTokenCaptured
(Player player, LudoToken token, int oldTileId) Handles thetokenCaptured
event from theLudoBoardGame
model.void
LudoGameController.onTokenFinished
(Player player, LudoToken token) Handles thetokenFinished
event from theLudoBoardGame
model.void
LudoGameController.onTokenMoved
(Player player, LudoToken token, int diceRoll, int oldTileId, int newTileId) Handles thetokenMoved
event from theLudoBoardGame
model.void
LudoGameController.onTokenReleased
(Player player, int tileId, int tokenId) Handles thetokenReleased
event from theLudoBoardGame
model.void
LudoGameController.onTurnSkipped
(Player player, int diceRoll) Handles theturnSkipped
event from theLudoBoardGame
model.Method parameters in edu.ntnu.idi.idatt.controller.ludo with type arguments of type PlayerModifier and TypeMethodDescriptionvoid
LudoGameController.initializeBoardGame
(Board board, List<Player> players) Initializes theGameController.boardGame
instance as aLudoBoardGame
.Constructor parameters in edu.ntnu.idi.idatt.controller.ludo with type arguments of type PlayerModifierConstructorDescriptionLudoGameController
(LudoGameView ludoGameView, Board board, List<Player> players) Constructs a newLudoGameController
. -
Uses of Player in edu.ntnu.idi.idatt.factory.player
Methods in edu.ntnu.idi.idatt.factory.player that return PlayerModifier and TypeMethodDescriptionstatic Player
PlayerFactory.createLadderGamePlayer
(String name, String colorHex, PlayerTokenType playerTokenType, boolean isBot) Creates a single LadderGame player with the given name and colorHex.static Player
PlayerFactory.createLudoPlayer
(String name, String colorHex, PlayerTokenType playerTokenType, boolean isBot) Creates a single Ludo player with the given name and colorHex.Methods in edu.ntnu.idi.idatt.factory.player that return types with arguments of type PlayerModifier and TypeMethodDescriptionPlayerFactory.createPlayersFromFile
(String filePath) Creates a list of Player objects by reading from the given CSV file. -
Uses of Player in edu.ntnu.idi.idatt.filehandler
Methods in edu.ntnu.idi.idatt.filehandler that return PlayerModifier and TypeMethodDescriptionPlayerFileHandlerCsv.ladderGamePlayerFromCsvLine
(String line) Parses a line from a CSV file, expectingLadderGamePlayer
data format.PlayerFileHandlerCsv.ludoPlayerFromCsvLine
(String line) Parses a line from a CSV file, expectingLudoPlayer
data format.Methods in edu.ntnu.idi.idatt.filehandler that return types with arguments of type PlayerModifier and TypeMethodDescriptionReads a list ofPlayer
objects from a CSV file at the specified path.Methods in edu.ntnu.idi.idatt.filehandler with parameters of type PlayerMethod parameters in edu.ntnu.idi.idatt.filehandler with type arguments of type Player -
Uses of Player in edu.ntnu.idi.idatt.model.game
Fields in edu.ntnu.idi.idatt.model.game declared as PlayerFields in edu.ntnu.idi.idatt.model.game with type parameters of type PlayerMethods in edu.ntnu.idi.idatt.model.game that return PlayerModifier and TypeMethodDescriptionBoardGame.getCurrentPlayer()
Game.getCurrentPlayer()
Gets the current player.Game.getWinner()
Checks if the game has a winner.LadderBoardGame.getWinner()
Determines the winner of the game.LudoBoardGame.getWinner()
Determines if there is a winner in the Ludo game.Methods in edu.ntnu.idi.idatt.model.game that return types with arguments of type PlayerModifier and TypeMethodDescriptionBoardGame.getPlayers()
Game.getPlayers()
Gets all players in the game.Methods in edu.ntnu.idi.idatt.model.game with parameters of type PlayerModifier and TypeMethodDescriptionvoid
BoardGame.notifyCurrentPlayerChanged
(Player player) Notifies all registered observers that the current player has changed.void
BoardGame.notifyGameFinished
(Player winner) Notifies all registered observers that the game has finished.void
LadderBoardGame.notifyTileActionPerformed
(Player player, TileAction tileAction) Notifies registered observers (specificallyLadderGameController
instances) that a tile action has been performed.void
BoardGame.setCurrentPlayer
(Player player) Sets the current player.void
Game.setCurrentPlayer
(Player player) Sets the current player.Method parameters in edu.ntnu.idi.idatt.model.game with type arguments of type PlayerModifier and TypeMethodDescriptionvoid
BoardGame.setPlayers
(List<Player> players) Sets the list of players for the game.void
Game.setPlayers
(List<Player> players) Sets the game players.Constructor parameters in edu.ntnu.idi.idatt.model.game with type arguments of type PlayerModifierConstructorDescriptionprotected
Constructor for BoardGame.LadderBoardGame
(Board board, List<Player> players, int diceCount) Constructs a LadderBoardGame.LudoBoardGame
(Board board, List<Player> players, int diceCount) Constructs a newLudoBoardGame
. -
Uses of Player in edu.ntnu.idi.idatt.model.player
Subclasses of Player in edu.ntnu.idi.idatt.model.playerModifier and TypeClassDescriptionclass
LadderGamePlayer.class
LudoPlayer. -
Uses of Player in edu.ntnu.idi.idatt.model.tile
Methods in edu.ntnu.idi.idatt.model.tile with parameters of type PlayerModifier and TypeMethodDescriptionvoid
Performs the action on the given player and board.void
Performs the action on the given player and board.void
Performs the action on the given player and board.void
Performs the action on the given player and board.void
Performs the action on the given player and board. -
Uses of Player in edu.ntnu.idi.idatt.model.validator
Methods in edu.ntnu.idi.idatt.model.validator with parameters of type PlayerModifier and TypeMethodDescriptionstatic void
ArgumentValidator.boardGameSetCurrentPlayerValidator
(Player player) Validates the arguments for the setCurrentPlayer method in BoardGame class.static void
ArgumentValidator.tileActionPerformValidator
(Player player, Board board) Validates the arguments for the perform method in LadderAction class.Method parameters in edu.ntnu.idi.idatt.model.validator with type arguments of type PlayerModifier and TypeMethodDescriptionstatic void
ArgumentValidator.boardGameSetPlayersValidator
(List<Player> players) Validates the arguments for the setPlayers method in the BoardGame class. -
Uses of Player in edu.ntnu.idi.idatt.observer
Methods in edu.ntnu.idi.idatt.observer with parameters of type PlayerModifier and TypeMethodDescriptionvoid
BoardGameSubject.notifyCurrentPlayerChanged
(Player player) Notifies the observers that the current player has changed.void
BoardGameSubject.notifyGameFinished
(Player winner) Notifies the observers that the game has finished.void
BoardGameObserver.onCurrentPlayerChanged
(Player player) Called when the current player changes.void
BoardGameObserver.onGameFinished
(Player winner) Called when the game has finished. -
Uses of Player in edu.ntnu.idi.idatt.view.common
Fields in edu.ntnu.idi.idatt.view.common with type parameters of type PlayerMethods in edu.ntnu.idi.idatt.view.common with parameters of type PlayerModifier and TypeMethodDescriptionprotected abstract void
GamePlayerRow.initialize
(Player player) Initializes the visual components of this player row.void
GamePlayerRow.setTileNumber
(Player player, String text) Sets the text of theGamePlayerRow.playerTile
label, which usually displays the player's current tile number or status.Method parameters in edu.ntnu.idi.idatt.view.common with type arguments of type PlayerModifier and TypeMethodDescriptionabstract void
GameStackPane.addGamePieces
(List<Player> players) Adds the visual representations (game pieces/tokens) for all players to theGameStackPane.playersPane
.abstract GameStackPane
GameView.createGameStackPane
(Board board, List<Player> players) Creates and returns theGameStackPane
that will display the game board and pieces.abstract GamePlayersBox
GameView.createPlayersBox
(List<Player> players, int roundNumber) Creates and returns theGamePlayersBox
to display player information.void
GameFinishedView.initialize
(List<Player> rankedPlayers) Initializes the game finished view with player rankings.protected abstract void
GamePlayersBox.initialize
(List<Player> players) Initializes the player box by creating and addingGamePlayerRow
s for each player and setting up the round number display.void
GameView.initialize
(List<Player> players, int roundNumber, Board board) Initializes the main components of the game view: the player information box, the game board area, and the game menu/controls box.void
MenuView.setPlayers
(List<Player> players) Replaces the current player rows in the menu with new rows based on the provided list ofPlayer
s.Constructors in edu.ntnu.idi.idatt.view.common with parameters of type PlayerModifierConstructorDescriptionGamePlayerRow
(Player player) Constructs a GamePlayerRow for the given player.Constructor parameters in edu.ntnu.idi.idatt.view.common with type arguments of type PlayerModifierConstructorDescriptionprotected
GamePlayersBox
(List<Player> players, int initialRoundNumber) Constructs a GamePlayersBox.protected
GameStackPane
(Board board, List<Player> players) Constructs a GameStackPane. -
Uses of Player in edu.ntnu.idi.idatt.view.laddergame
Fields in edu.ntnu.idi.idatt.view.laddergame with type parameters of type PlayerModifier and TypeFieldDescriptionLadderGameStackPane.playerTileMap
LadderGameStackPane.playerTokenMap
Methods in edu.ntnu.idi.idatt.view.laddergame with parameters of type PlayerModifier and TypeMethodDescriptionprotected void
LadderGamePlayerRow.initialize
(Player player) Initializes the visual components of the player row.void
LadderGameStackPane.movePlayer
(Player player, Tile newTile, boolean straightLine, Runnable onFinished) Moves the player to the new tile, with an optional straight line option to allow for a tile action animation.Method parameters in edu.ntnu.idi.idatt.view.laddergame with type arguments of type PlayerModifier and TypeMethodDescriptionvoid
LadderGameStackPane.addGamePieces
(List<Player> players) Adds game pieces to the board for the players in the given list, and places them on the first tile of the board.LadderGameView.createGameStackPane
(Board board, List<Player> players) Creates and returns aLadderGameStackPane
to display the visual representation of theLadderGameBoard
, including the grid, components (ladders, slides), and player tokens.LadderGameView.createPlayersBox
(List<Player> players, int roundNumber) Creates and returns aLadderGamePlayersBox
to display player information (like name, token, and current tile) and the current round number for the Ladder Game.protected void
LadderGamePlayersBox.initialize
(List<Player> players) Initializes the players box by creating all the components and adding the players to the box.Constructors in edu.ntnu.idi.idatt.view.laddergame with parameters of type PlayerModifierConstructorDescriptionLadderGamePlayerRow
(Player player) Constructs aLadderGamePlayerRow
for the given player.Constructor parameters in edu.ntnu.idi.idatt.view.laddergame with type arguments of type PlayerModifierConstructorDescriptionLadderGamePlayersBox
(List<Player> players, int initialRoundNumber) Constructs aLadderGamePlayersBox
.LadderGameStackPane
(LadderGameBoard board, List<Player> players) Constructor for GameBoardStackPane class. -
Uses of Player in edu.ntnu.idi.idatt.view.ludo
Methods in edu.ntnu.idi.idatt.view.ludo with parameters of type PlayerModifier and TypeMethodDescriptionprotected void
LudoGamePlayerRow.initialize
(Player player) Initializes the visual components of the player row for a Ludo game.void
LudoGameStackPane.moveTokenToStartArea
(Player player, LudoToken token) Animates the movement of a captured Ludo token back to its start area.void
LudoGamePlayerRow.setTileNumber
(Player player, String text) Updates the text displaying the number of finished tokens for the player.Method parameters in edu.ntnu.idi.idatt.view.ludo with type arguments of type PlayerModifier and TypeMethodDescriptionvoid
LudoGameStackPane.addGamePieces
(List<Player> players) Adds the visual representations (game pieces) for each player's tokens to the board.LudoGameView.createGameStackPane
(Board board, List<Player> players) Creates aLudoGameStackPane
to render the Ludo game board and its interactive elements.LudoGameView.createPlayersBox
(List<Player> players, int roundNumber) Creates aLudoGamePlayersBox
to display player information for the Ludo game.protected void
LudoGamePlayersBox.initialize
(List<Player> players) Initializes the players box by creating all the components and adding the players to the box.Constructors in edu.ntnu.idi.idatt.view.ludo with parameters of type PlayerModifierConstructorDescriptionLudoGamePlayerRow
(Player player) Constructs aLudoGamePlayerRow
for the given player.Constructor parameters in edu.ntnu.idi.idatt.view.ludo with type arguments of type PlayerModifierConstructorDescriptionLudoGamePlayersBox
(List<Player> players, int initialRoundNumber) Constructs aLudoGamePlayersBox
with the given list of players and initial round number.LudoGameStackPane
(LudoGameBoard board, List<Player> players) Constructs aLudoGameStackPane
for the given Ludo game board and list of players.