Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- add(Position, Position) - Static method in class edu.uoc.pacman.model.utils.Position
-
Creates a new
Position
object as a result to addp1
andp2
. - addMapItem(MapItem) - Method in class edu.uoc.pacman.model.Level
-
Adds
item
to themapItemList
as long asitem
is notnull
. - addPoints(int) - Method in class edu.uoc.pacman.model.Level
-
Add the value of
points
to the attributescore
as long aspoints
is greater than 0. - alive() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Sets the attribute
dead
tofalse
. - assetManager - Static variable in class edu.uoc.pacman.view.PacmanGame
B
- batch - Variable in class edu.uoc.pacman.view.PacmanGame
- behaviour - Variable in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Behaviour in which the ghost is.
- Behaviour - Enum Class in edu.uoc.pacman.model.entities.characters.ghosts
-
Behaviour
defines the different behaviour which a ghost can be in. - Behaviour(int) - Constructor for enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Constructor with arguments.
- Blinky - Class in edu.uoc.pacman.model.entities.characters.ghosts
-
Represents a Blinky (red) ghost.
- Blinky(Position, Direction, Behaviour, Level) - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.Blinky
-
Constructor with arguments.
The value of thescatterPosition
is (level.WIDTH,-1).
The value of thesprite
isSprite.BLINKY
.
It assigns tochaseBehaviour
aChaseAggressive
object. - BLINKY - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for a Blinky ghost.
- blinkyAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
C
- camera - Variable in class edu.uoc.pacman.view.GameOverScreen
- camera - Variable in class edu.uoc.pacman.view.InterLevelsScreen
- camera - Variable in class edu.uoc.pacman.view.WelcomeScreen
- CELL_SIZE - Static variable in class edu.uoc.pacman.view.PacmanGame
- Character - Class in edu.uoc.pacman.model.entities.characters
-
A character is any entity that is able to move and hit.
- Character(Position, Direction, Sprite, Level) - Constructor for class edu.uoc.pacman.model.entities.characters.Character
-
Creates a character at the given position facing in the given direction.
Any character ispathable
.
If the position isnull
, then the position will be (0,0).
Take into consideration that the value of the parameterposition
is also the start/initial position of the character.
If the direction isnull
, then the direction will beUP
.
By default, any character is alive. - CHASE - Enum constant in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Behaviour where the ghosts chase Pacman.
- ChaseAggressive - Class in edu.uoc.pacman.model.entities.characters.ghosts.chase
-
It implements the
ChaseBehaviour
interface according to an aggressive behaviour.
Its target position is directly Pacman's position. - ChaseAggressive() - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseAggressive
- ChaseAmbush - Class in edu.uoc.pacman.model.entities.characters.ghosts.chase
-
It implements the
ChaseBehaviour
interface according to an ambush behaviour.
Its target position is four steps ahead of Pacman's position in the direction Pacman is facing. - ChaseAmbush() - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseAmbush
- chaseBehaviour - Variable in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Object that allows us to assign a specific
ChaseBehaviour
class. - ChaseBehaviour - Interface in edu.uoc.pacman.model.entities.characters.ghosts.chase
-
Defines the methods that any character (namely, ghost) must have to chase.
Thanks to this interface, we are using the Strategy design pattern. - ChaseCoward - Class in edu.uoc.pacman.model.entities.characters.ghosts.chase
-
It implements the
ChaseBehaviour
interface according to a coward behaviour.
It has two different modes which it constantly switches back and forth between, based on its proximity to Pacman. - ChaseCoward() - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseCoward
- ChasePatrol - Class in edu.uoc.pacman.model.entities.characters.ghosts.chase
-
It implements the
ChaseBehaviour
interface according to an aggressive behaviour.
In order to locate Inky's target position, we first start by selecting the positionTILES_OFFSET
tiles in front of Pac-Man in his current direction of travel, similar to Pinky's targeting method. - ChasePatrol() - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChasePatrol
- Clyde - Class in edu.uoc.pacman.model.entities.characters.ghosts
-
Represents a Clyde (orange) ghost.
- Clyde(Position, Direction, Behaviour, Level) - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.Clyde
-
Constructor with arguments.
The value of thescatterPosition
is (-1,LEVEL.HEIGHT).
The value of thesprite
isSprite.CLYDE
.
It assigns tochaseBehaviour
aChaseCoward
object. - CLYDE - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for a Clyde ghost.
- clydeAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- create() - Method in class edu.uoc.pacman.view.PacmanGame
- currentLevel - Variable in class edu.uoc.pacman.controller.Game
-
Number of the current level.
D
- dead - Variable in class edu.uoc.pacman.model.entities.characters.Character
-
Indicates if the character is dead (
true
) or not (false
). - decreaseLives() - Method in class edu.uoc.pacman.model.Level
-
Decreases 1 the number of lives as long as the number of lives is not zero.
- direction - Variable in class edu.uoc.pacman.model.entities.characters.Character
-
The direction that the character faces.
- Direction - Enum Class in edu.uoc.pacman.model.utils
-
Direction that Pacman and ghosts face.
RESPECT The order of the values: RIGHT, DOWN, LEFT, UP. - Direction(int, int, int) - Constructor for enum class edu.uoc.pacman.model.utils.Direction
- dispose() - Method in class edu.uoc.pacman.view.GameOverScreen
- dispose() - Method in class edu.uoc.pacman.view.GameScreen
- dispose() - Method in class edu.uoc.pacman.view.InterLevelsScreen
- dispose() - Method in class edu.uoc.pacman.view.PacmanGame
- dispose() - Method in class edu.uoc.pacman.view.WelcomeScreen
- distance(Position) - Method in class edu.uoc.pacman.model.utils.Position
-
Calculates the Euclidean distance from this point to other given point.
- Dot - Class in edu.uoc.pacman.model.entities.items
-
Represents a dot in the labyrinth/map.
- Dot(Position) - Constructor for class edu.uoc.pacman.model.entities.items.Dot
-
Constructor with argument.
The value forpathable
istrue
and forsprite
isSprite.DOT
. - DOT - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for a dot.
- dotAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- DOWN - Enum constant in enum class edu.uoc.pacman.model.utils.Direction
-
DOWN direction. x = 0, y = 1 and keyCode = 20.
- drawImage(Sprite, int, int) - Method in class edu.uoc.pacman.view.PacmanGame
- duration - Variable in class edu.uoc.pacman.model.entities.characters.Character
-
Left time so that the ghost changes its current behaviour or the Pacman changes its current state.
- duration - Variable in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Stores the duration of the behaviour.
- duration - Variable in enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
Stores the duration of the state.
E
- eat() - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Performs the eat action.
- EATER - Enum constant in enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
State when Pacman eats an energizer and is able to eat/kill ghosts.
- edu.uoc.pacman.controller - package edu.uoc.pacman.controller
- edu.uoc.pacman.model - package edu.uoc.pacman.model
- edu.uoc.pacman.model.entities - package edu.uoc.pacman.model.entities
- edu.uoc.pacman.model.entities.characters - package edu.uoc.pacman.model.entities.characters
- edu.uoc.pacman.model.entities.characters.ghosts - package edu.uoc.pacman.model.entities.characters.ghosts
- edu.uoc.pacman.model.entities.characters.ghosts.chase - package edu.uoc.pacman.model.entities.characters.ghosts.chase
- edu.uoc.pacman.model.entities.characters.pacman - package edu.uoc.pacman.model.entities.characters.pacman
- edu.uoc.pacman.model.entities.items - package edu.uoc.pacman.model.entities.items
- edu.uoc.pacman.model.exceptions - package edu.uoc.pacman.model.exceptions
- edu.uoc.pacman.model.utils - package edu.uoc.pacman.model.utils
- edu.uoc.pacman.view - package edu.uoc.pacman.view
- Energizer - Class in edu.uoc.pacman.model.entities.items
-
Represents an energizer in the labyrinth/map.
- Energizer(Position) - Constructor for class edu.uoc.pacman.model.entities.items.Energizer
-
Constructor with argument.
The value forpathable
istrue
and forsprite
isSprite.ENERGIZER
. - ENERGIZER - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for an energizer.
- energizerAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- Entity - Class in edu.uoc.pacman.model.entities
-
Represents any item that appears in the game.
- Entity(Position, boolean, Sprite) - Constructor for class edu.uoc.pacman.model.entities.Entity
-
Constructor with arguments.
- equals(Object) - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Checks if another object instance is equal to this ghost.
- equals(Object) - Method in class edu.uoc.pacman.model.utils.Position
-
Checks if two positions are equal.
F
- fileFolder - Variable in class edu.uoc.pacman.controller.Game
-
Name of the folder in which level files are
- fileName - Variable in class edu.uoc.pacman.model.Level
-
The name of the level configuration file.
- font - Variable in class edu.uoc.pacman.view.PacmanGame
- FRIGHTENED - Enum constant in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Behaviour where the ghosts are frightened and confused.
G
- game - Variable in class edu.uoc.pacman.view.GameOverScreen
- game - Variable in class edu.uoc.pacman.view.GameScreen
- game - Variable in class edu.uoc.pacman.view.InterLevelsScreen
- game - Variable in class edu.uoc.pacman.view.WelcomeScreen
- Game - Class in edu.uoc.pacman.controller
-
Controller class of the game.
- Game(String) - Constructor for class edu.uoc.pacman.controller.Game
-
Constructor with argument.
- gameController - Variable in class edu.uoc.pacman.view.GameScreen
- gameController - Variable in class edu.uoc.pacman.view.PacmanGame
- gameController - Variable in class edu.uoc.pacman.view.UserInputProcessor
- GameOverScreen - Class in edu.uoc.pacman.view
- GameOverScreen(PacmanGame) - Constructor for class edu.uoc.pacman.view.GameOverScreen
- GameScreen - Class in edu.uoc.pacman.view
- GameScreen(PacmanGame) - Constructor for class edu.uoc.pacman.view.GameScreen
- getAssertBySprite(Sprite) - Method in class edu.uoc.pacman.view.PacmanGame
- getBehaviour() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Gets the behaviour that the ghost currently is in.
- getBlinky() - Method in class edu.uoc.pacman.model.Level
-
Gets the first
Blinky
object in the Ghost list of the level. - getChasePosition(Ghost) - Method in class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseAggressive
-
The ghost will chase the Pacman's current direction.
- getChasePosition(Ghost) - Method in class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseAmbush
-
The ghost will chase the position which is
TILES_OFFSET
steps/tiles/cells/positions ahead of Pacman's position in the direction Pacman is facing. - getChasePosition(Ghost) - Method in interface edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseBehaviour
-
Defines the signature of the method to be used to get the position where any character (namely, ghosts) must to go to.
- getChasePosition(Ghost) - Method in class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseCoward
-
The ghost will target Pacman's position if the euclidean distance between position is equal to or greater than a distance of
TILES_TO_CHASE
. - getChasePosition(Ghost) - Method in class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChasePatrol
-
The ghost will chase twice a vector equals to:
- getCurrentLevel() - Method in class edu.uoc.pacman.controller.Game
-
Getter of the attribute
currentLevel
. - getDirection() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Gets the direction that the character is facing.
- getDirectionByKeyCode(int) - Static method in enum class edu.uoc.pacman.model.utils.Direction
-
Given the value of
keyCode
, it returns the correspondingDirection
value. - getDuration() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Getter of the attribute
duration
. - getDuration() - Method in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Gets the duration of the behaviour.
- getDuration() - Method in enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
Gets the duration of the state.
- getFileFolder() - Method in class edu.uoc.pacman.controller.Game
-
Getter of the attribute
fileFolder
. - getFileName() - Method in class edu.uoc.pacman.model.Level
-
Getter of the attribute
fileName
- getFirstNonEmptyLine(BufferedReader) - Method in class edu.uoc.pacman.model.Level
-
This is a helper method for
Level.parse()
which returns the first non-empty and non-comment line from the reader. - getGameController() - Method in class edu.uoc.pacman.view.PacmanGame
- getGhostInstance(int, int, String, Direction, Behaviour, Level) - Static method in class edu.uoc.pacman.model.entities.characters.ghosts.GhostFactory
-
Returns a new
Ghost
object. - getGhostList() - Method in class edu.uoc.pacman.model.Level
-
Getter of the attribute
ghostList
. - getGhosts() - Method in class edu.uoc.pacman.controller.Game
-
Gets the list of Ghosts which are present in the level.
- getHeight() - Method in class edu.uoc.pacman.model.Level
-
Getter of the attribute
height
. - getImageSrc() - Method in enum class edu.uoc.pacman.model.utils.Sprite
-
Getter of the attribute
imageSrc
. - getItemMapInstance(int, int, char) - Static method in class edu.uoc.pacman.model.entities.items.MapItemFactory
-
Returns a new
MapItem
object. - getItemMapListIterator() - Method in class edu.uoc.pacman.controller.Game
-
Gets an Iterator of the
itemMapList
- getKeyCode() - Method in enum class edu.uoc.pacman.model.utils.Direction
-
Getter of the attibute
keyCode
- getLevel() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Getter of the attribute
level
. - getLevelScore() - Method in class edu.uoc.pacman.controller.Game
-
Gets the current score of the level that the player is playing.
- getLives() - Method in class edu.uoc.pacman.model.Level
-
Getter of the attribute
lives
. - getMapItem(int, int) - Method in class edu.uoc.pacman.model.Level
-
Returns the map/labyrinth item which is in the position (x,y).
- getMapItem(Position) - Method in class edu.uoc.pacman.model.Level
-
Returns the map/labyrinth item which is in
position
. - getMapItemList() - Method in class edu.uoc.pacman.model.Level
-
Getter of the attribute
mapItemList
. - getMapItemListIterator() - Method in class edu.uoc.pacman.model.Level
-
Returns an Iterator of the attribute
mapItemList
. - getNumLives() - Method in class edu.uoc.pacman.controller.Game
-
Returns the number of lives that the player has in the current level.
- getPacman() - Method in class edu.uoc.pacman.controller.Game
-
Gests the @link Pacman} object which is present in the current level.
- getPacman() - Method in class edu.uoc.pacman.model.Level
-
Getter ot the attribute
pacman
. - getPoints() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Blinky
-
Getter of the attribute
POINTS
. - getPoints() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Clyde
-
Getter of the attribute
POINTS
. - getPoints() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Inky
-
Getter of the attribute
POINTS
. - getPoints() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Pinky
-
Getter of the attribute
POINTS
. - getPoints() - Method in class edu.uoc.pacman.model.entities.items.Dot
-
Getter of the attribute
POINTS
. - getPoints() - Method in class edu.uoc.pacman.model.entities.items.Energizer
-
Getter of the attribute
POINTS
. - getPoints() - Method in interface edu.uoc.pacman.model.entities.Scorable
-
Gets points.
- getPosition() - Method in class edu.uoc.pacman.model.entities.Entity
-
Gets the current position of the entity.
- getScatterPosition() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Getter of the attribute
scatterPosition
. - getScore() - Method in class edu.uoc.pacman.controller.Game
-
Getter of the attribute "score" (Game score).
- getScore() - Method in class edu.uoc.pacman.model.Level
-
Getter of the attribute
score
. - getSprite() - Method in class edu.uoc.pacman.model.entities.Entity
-
Getter of the attribute
sprite
. - getStartPosition() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Getter of the attribute
startPosition
. - getState() - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Getter of the attribute
state
. - getSymbol() - Method in enum class edu.uoc.pacman.model.utils.Sprite
-
Getter of the attribute
symbol
. - getTargetPosition() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Returns the target position of the ghosts according to its current behaviour.
- getWidth() - Method in class edu.uoc.pacman.model.Level
-
Getter of the attribute
width
. - getX() - Method in enum class edu.uoc.pacman.model.utils.Direction
-
Getter of the attibute
x
- getX() - Method in class edu.uoc.pacman.model.utils.Position
-
Getter of the attribute
x
- getY() - Method in enum class edu.uoc.pacman.model.utils.Direction
-
Getter of the attibute
y
- getY() - Method in class edu.uoc.pacman.model.utils.Position
-
Getter of the attribute
y
- Ghost - Class in edu.uoc.pacman.model.entities.characters.ghosts
-
Represents an abstract Ghost class which defines a specific
Character
entity. - Ghost(Position, Position, Direction, Behaviour, Sprite, Level) - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Constructor with arguments.
- GhostFactory - Class in edu.uoc.pacman.model.entities.characters.ghosts
-
Ghost Simple Factory class.
- GhostFactory() - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.GhostFactory
- ghostList - Variable in class edu.uoc.pacman.model.Level
-
Ghosts that are part of the level.
- GHOSTS_ERROR - Static variable in exception edu.uoc.pacman.model.exceptions.LevelException
-
Error message when there isn't any ghost
H
- hashCode() - Method in class edu.uoc.pacman.model.utils.Position
-
Returns the hash of a
Position
object. - hasLost() - Method in class edu.uoc.pacman.controller.Game
-
Checks if the player has lost, i.e. the number of lives is zero.
- hasWon() - Method in class edu.uoc.pacman.model.Level
-
Checks if the level was finished.
- height - Variable in class edu.uoc.pacman.model.Level
-
The height of the map/labyrinth.
- hide() - Method in class edu.uoc.pacman.view.GameOverScreen
- hide() - Method in class edu.uoc.pacman.view.GameScreen
- hide() - Method in class edu.uoc.pacman.view.InterLevelsScreen
- hide() - Method in class edu.uoc.pacman.view.WelcomeScreen
- hit() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Checks if the ghost hits Pacman, i.e. if ghost's position and Pacman's position are the same.
- hit() - Method in interface edu.uoc.pacman.model.entities.characters.Hitable
-
Defines the signature of the method that manages the hit action of any hitable entity.
- hit() - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Checks if Pacman is in the same position which any ghost.
- Hitable - Interface in edu.uoc.pacman.model.entities.characters
-
Defines the methods that any hitable entity must have.
I
- imageSrc - Variable in enum class edu.uoc.pacman.model.utils.Sprite
-
Value of the image path.
- INACTIVE - Enum constant in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Behaviour where the ghosts don't do anything and Pacman cannot kill them.
- increaseLives() - Method in class edu.uoc.pacman.model.Level
-
Increases 1 the number of lives.
- Inky - Class in edu.uoc.pacman.model.entities.characters.ghosts
-
Represents an Inky (bluish) ghost.
- Inky(Position, Direction, Behaviour, Level) - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.Inky
-
Constructor with arguments.
The value of thescatterPosition
is (LEVEL.WIDTH,LEVEL.HEIGHT).
The value of thesprite
isSprite.INKY
.
It assigns tochaseBehaviour
aChasePatrol
object. - INKY - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for an Inky ghost.
- inkyAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- InterLevelsScreen - Class in edu.uoc.pacman.view
- InterLevelsScreen(PacmanGame) - Constructor for class edu.uoc.pacman.view.InterLevelsScreen
- INVINCIBLE - Enum constant in enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
State when Pacman has been killed, and it cannot neither be killed nor kill ghosts.
- isDead() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Getter of the attribute
dead
. - isFinished() - Method in class edu.uoc.pacman.controller.Game
-
Indicates if the game is finished (
true
) or not (false
). - isLevelCompleted() - Method in class edu.uoc.pacman.controller.Game
-
Checks if the level is completed, i.e. the player has collected all the dots and energizers of the map.
- isPathable() - Method in class edu.uoc.pacman.model.entities.Entity
-
Getter of the attribute
pathable
. - isPathable(Position) - Method in class edu.uoc.pacman.model.Level
-
Given a position, it indicates if such a position is pathable or not.
- isPicked() - Method in class edu.uoc.pacman.model.entities.items.Dot
-
Getter of the attribute
picked
. - isPicked() - Method in class edu.uoc.pacman.model.entities.items.Energizer
-
Getter of the attribute
picked
. - isPicked() - Method in class edu.uoc.pacman.model.entities.items.Life
-
Getter of the attribute
picked
. - isPicked() - Method in interface edu.uoc.pacman.model.entities.items.Pickable
-
Method that allows us to know if the item has been picked or not.
K
- keyCode - Variable in enum class edu.uoc.pacman.model.utils.Direction
-
Intenger value that is given by libgdx to a key pressed by the user
- keyDown(int) - Method in class edu.uoc.pacman.view.UserInputProcessor
- keyUp(int) - Method in class edu.uoc.pacman.view.UserInputProcessor
- kill() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Sets the attribute
dead
totrue
. - kill() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Kills the ghost and add its points to the level's score.
- kill() - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Kills Pacman and decreases one life in the current level.
L
- LEFT - Enum constant in enum class edu.uoc.pacman.model.utils.Direction
-
LEFT direction. x = -1, y = 0 and keyCode = 21.
- level - Variable in class edu.uoc.pacman.controller.Game
-
Level object that contains the information of the current level.
- level - Variable in class edu.uoc.pacman.model.entities.characters.Character
-
Reference to the current level object.
- Level - Class in edu.uoc.pacman.model
-
Represents a level in the game.
- Level(String, int) - Constructor for class edu.uoc.pacman.model.Level
-
Constructor with argument.
- LevelException - Exception in edu.uoc.pacman.model.exceptions
-
Level Exception class.
In order to know the text of each message, please click on the "Constant Field Values" link that you'll find in the description of each constant. - LevelException(String) - Constructor for exception edu.uoc.pacman.model.exceptions.LevelException
-
Constructor with argument.
- Life - Class in edu.uoc.pacman.model.entities.items
-
Represents a life in the labyrinth/map.
- Life(Position) - Constructor for class edu.uoc.pacman.model.entities.items.Life
-
Constructor with argument.
The value forpathable
istrue
and forsprite
isSprite.LIFE
. - LIFE - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for a life.
- lifeAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- lives - Variable in class edu.uoc.pacman.model.Level
-
Number of lives in the level.
- loaded - Variable in class edu.uoc.pacman.view.GameScreen
- loadImages() - Method in class edu.uoc.pacman.view.PacmanGame
- loadLevel() - Method in class edu.uoc.pacman.controller.Game
-
Loads a new level by using the value of the attribute
currentLevel
. - logoAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
M
- MapItem - Class in edu.uoc.pacman.model.entities.items
-
Abstract class that represents any labyrinth/map item.
- MapItem(Position, boolean, Sprite) - Constructor for class edu.uoc.pacman.model.entities.items.MapItem
-
Constructor with arguments.
- MapItemFactory - Class in edu.uoc.pacman.model.entities.items
-
Entity Simple Factory class.
- MapItemFactory() - Constructor for class edu.uoc.pacman.model.entities.items.MapItemFactory
- mapItemList - Variable in class edu.uoc.pacman.model.Level
-
Stores the items which are part of the map/labyrinth.
- maxLevels - Variable in class edu.uoc.pacman.controller.Game
-
Maximum amount of levels that the game has.
- MIN_HEIGHT - Static variable in class edu.uoc.pacman.model.Level
-
The minimum height that the map must have.
- MIN_WIDTH - Static variable in class edu.uoc.pacman.model.Level
-
The minimum width that the map must have.
- Movable - Interface in edu.uoc.pacman.model.entities.characters
-
Defines the methods that any movable entity must have.
- move() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Moves the ghost according to the game rules.
If the targetPosition isnull
(e.g. because ghost's behavior is INACTIVE}, then the ghost does not move. - move() - Method in interface edu.uoc.pacman.model.entities.characters.Movable
-
Defines the signature of the method that manages the movement of any movable entity.
- move() - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Moves Pacman across the board only one step.
N
- nextBehaviour() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Decreases the
behaviour
's duration and changes the ghost's behaviour to the next behaviour ifduration
is 0. - nextLevel() - Method in class edu.uoc.pacman.controller.Game
-
Checks if there is a new level to play and loads it.
If the game is finished, it returnsfalse
. - nextState() - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Decreases the
behaviour
's duration and changes the ghost's behaviour to the next behaviour ifduration
is 0. - NORMAL - Enum constant in enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
State in which Pacman is usually.
- NUM_LIVES - Static variable in class edu.uoc.pacman.controller.Game
-
Number of lives which each level has when it starts.
O
- opposite() - Method in enum class edu.uoc.pacman.model.utils.Direction
-
Gets the opposite direction of the direction that invokes this method.
P
- pacman - Variable in class edu.uoc.pacman.model.Level
-
Reference to
Pacman
object, i.e. the player. - Pacman - Class in edu.uoc.pacman.model.entities.characters.pacman
-
Represents the player object that appears in the game, which is called Pacman.
- Pacman(Position, Direction, State, Level) - Constructor for class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Constructor with arguments.
- PACMAN_DOWN - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite when Pacman is facing down.
- PACMAN_LEFT - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite when Pacman is facing left.
- PACMAN_RIGHT - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite when Pacman is facing right.
- PACMAN_UP - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite when Pacman is facing up.
- pacmanDownAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- PacmanGame - Class in edu.uoc.pacman.view
- PacmanGame() - Constructor for class edu.uoc.pacman.view.PacmanGame
- pacmanLeftAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- pacmanRightAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- pacmanUpAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- parse() - Method in class edu.uoc.pacman.model.Level
-
Parses/Reads level's data from the given file.
It also checks which the board's requirements are met. - PARSING_LEVEL_FILE_ERROR - Static variable in exception edu.uoc.pacman.model.exceptions.LevelException
-
Error message when there is an error while parsing/loading the level configuration file.
- Path - Class in edu.uoc.pacman.model.entities.items
-
Represents a path in the labyrinth/map.
- Path(Position) - Constructor for class edu.uoc.pacman.model.entities.items.Path
-
Constructor with arguments.
The value forpathable
istrue
and forsprite
isSprite.PATH
. - PATH - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for a piece of path.
- pathable - Variable in class edu.uoc.pacman.model.entities.Entity
-
Indicates if the entity is pathable or not.
- pathAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- pause() - Method in class edu.uoc.pacman.view.GameOverScreen
- pause() - Method in class edu.uoc.pacman.view.GameScreen
- pause() - Method in class edu.uoc.pacman.view.InterLevelsScreen
- pause() - Method in class edu.uoc.pacman.view.WelcomeScreen
- Pickable - Interface in edu.uoc.pacman.model.entities.items
-
Defines the methods that any pickable item must have.
- PICKABLE_ERROR - Static variable in exception edu.uoc.pacman.model.exceptions.LevelException
-
Error message when there are not any dot or energizer.
- picked - Variable in class edu.uoc.pacman.model.entities.items.Dot
-
This attribute allows us to manage if the dot has been picked or not.
- picked - Variable in class edu.uoc.pacman.model.entities.items.Energizer
-
This attribute allows us to manage if the energizer has been picked or not.
- picked - Variable in class edu.uoc.pacman.model.entities.items.Life
-
This attribute allows us to manage if the life has been picked or not.
- Pinky - Class in edu.uoc.pacman.model.entities.characters.ghosts
-
Represents a Pinky ghost.
- Pinky(Position, Direction, Behaviour, Level) - Constructor for class edu.uoc.pacman.model.entities.characters.ghosts.Pinky
-
Constructor with arguments.
The value of thescatterPosition
is (-1,-1).
The value of thesprite
isSprite.PINKY
.
It assigns tochaseBehaviour
aChaseAmbush
object. - PINKY - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for a Pinky ghost.
- pinkyAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- POINTS - Static variable in class edu.uoc.pacman.model.entities.characters.ghosts.Blinky
-
This attribute stores the amount of points that the Blinky ghost gives.
- POINTS - Static variable in class edu.uoc.pacman.model.entities.characters.ghosts.Clyde
-
This attribute stores the amount of points that the Inky ghost gives.
- POINTS - Static variable in class edu.uoc.pacman.model.entities.characters.ghosts.Inky
-
This attribute stores the amount of points that the Inky ghost gives.
- POINTS - Static variable in class edu.uoc.pacman.model.entities.characters.ghosts.Pinky
-
This attribute stores the amount of points that the Pinky ghost gives.
- POINTS - Static variable in class edu.uoc.pacman.model.entities.items.Dot
-
This attribute stores the amount of points that the dot gives.
- POINTS - Static variable in class edu.uoc.pacman.model.entities.items.Energizer
-
This attribute stores the amount of points that the energizer gives.
- position - Variable in class edu.uoc.pacman.model.entities.Entity
-
Position where the entity is.
- Position - Class in edu.uoc.pacman.model.utils
-
Stores a 2D position/point/coordinate.
- Position(int, int) - Constructor for class edu.uoc.pacman.model.utils.Position
-
Constructor with arguments.
R
- reload() - Method in class edu.uoc.pacman.controller.Game
-
Reloads the current level, i.e. load the level again.
- removeMapItem(MapItem) - Method in class edu.uoc.pacman.model.Level
-
Removes
item
from themapItemList
. - render() - Method in class edu.uoc.pacman.view.PacmanGame
- render(float) - Method in class edu.uoc.pacman.view.GameOverScreen
- render(float) - Method in class edu.uoc.pacman.view.GameScreen
- render(float) - Method in class edu.uoc.pacman.view.InterLevelsScreen
- render(float) - Method in class edu.uoc.pacman.view.WelcomeScreen
- reset() - Method in class edu.uoc.pacman.controller.Game
-
Resets the game so that it starts again.
- reset() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Resets the character.
- reset() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Resets the ghost back to its start position where it is "alive" (as the Character does) and also with a
behaviour
ofINACTIVE
and facingUP
. - reset() - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Resets Pacman back to its start position where it is "alive" (as Character does) and also with a
state
ofINVINCIBLE
and facingUP
. - resize(int, int) - Method in class edu.uoc.pacman.view.GameOverScreen
- resize(int, int) - Method in class edu.uoc.pacman.view.GameScreen
- resize(int, int) - Method in class edu.uoc.pacman.view.InterLevelsScreen
- resize(int, int) - Method in class edu.uoc.pacman.view.WelcomeScreen
- resume() - Method in class edu.uoc.pacman.view.GameOverScreen
- resume() - Method in class edu.uoc.pacman.view.GameScreen
- resume() - Method in class edu.uoc.pacman.view.InterLevelsScreen
- resume() - Method in class edu.uoc.pacman.view.WelcomeScreen
- RIGHT - Enum constant in enum class edu.uoc.pacman.model.utils.Direction
-
RIGHT direction. x = 1, y = 0 and keyCode = 22.
S
- SCATTER - Enum constant in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Behaviour where the ghosts run home (scatter position).
- scatterPosition - Variable in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Position that the ghost tries to reach when its behaviour is
SCATTER
. - Scorable - Interface in edu.uoc.pacman.model.entities
-
Defines the methods that any scorable entity must have.
- score - Variable in class edu.uoc.pacman.controller.Game
-
Total score of the game, i.e. the sum of the levels' scores.
- score - Variable in class edu.uoc.pacman.model.Level
-
Level's score.
- setBehaviour(Behaviour) - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Sets the current behaviour of the ghost.
Its duration overrides the value of the attributeduration
. - setDead(boolean) - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Setter of the attribute
dead
. - setDirection(Direction) - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Sets the direction of the character.
If the direction isnull
, then the direction is not set and remains the same. - setDirection(Direction) - Method in interface edu.uoc.pacman.model.entities.characters.Movable
-
Defines the signatures of the method that manages the direction in which any movable entity moves.
- setDirection(Direction) - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Sets the direction of Pacman.
If the new direction isnull
, then the direction is not set and remains the same.
Because Pacman has 4 different sprites depending on its direction, this method also updates the value of the attributesprite
, i.e. - setDuration(int) - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Setter of the attribute
duration
. - setFileFolder(String) - Method in class edu.uoc.pacman.controller.Game
-
Setter of the attribute
fileFolder
. - setFileName(String) - Method in class edu.uoc.pacman.model.Level
-
Setter of the attribute
fileName
. - setGhostsFrightened() - Method in class edu.uoc.pacman.model.Level
-
Sets the behaviour of all the ghosts in the level to FRIGHTENED.
- setHeight(int) - Method in class edu.uoc.pacman.model.Level
-
Setter of the attribute
height
. - setLevel(Level) - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Setter of the attribute
level
. - setLives(int) - Method in class edu.uoc.pacman.model.Level
-
Setter of the attribute
lives
. - setPacmanDirection(Direction) - Method in class edu.uoc.pacman.controller.Game
-
This method allows us to change Pacman's direction according to the user input (i.e. the pressed key).
- setPathable(boolean) - Method in class edu.uoc.pacman.model.entities.Entity
-
Setter of the attribute
pathable
. - setPicked(boolean) - Method in class edu.uoc.pacman.model.entities.items.Dot
-
Setter of the attribute
pickled
. - setPicked(boolean) - Method in class edu.uoc.pacman.model.entities.items.Energizer
-
Setter of the attribute
pickled
. - setPicked(boolean) - Method in class edu.uoc.pacman.model.entities.items.Life
-
Setter of the attribute
pickled
. - setPicked(boolean) - Method in interface edu.uoc.pacman.model.entities.items.Pickable
-
Sets the item as picked/unpicked.
- setPosition(Position) - Method in class edu.uoc.pacman.model.entities.Entity
-
Sets the position of the entity.
- setScatterPosition(Position) - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Setter of the attribute
scatterPosition
. - setScore(int) - Method in class edu.uoc.pacman.controller.Game
-
Setter of the attribute "score" (Game score).
- setSprite(Sprite) - Method in class edu.uoc.pacman.model.entities.Entity
-
Setter of the attribute
sprite
. - setStartPosition(Position) - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Setter of the attribute
startPosition
. - setState(State) - Method in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Setter of the attribute
state
.
If the new state isnull
, then the state is not set and remains the same. - setWidth(int) - Method in class edu.uoc.pacman.model.Level
-
Setter of the attribute
width
. - setX(int) - Method in class edu.uoc.pacman.model.utils.Position
-
Setter of the attribute
x
- setY(int) - Method in class edu.uoc.pacman.model.utils.Position
-
Setter of the attribute
y
- show() - Method in class edu.uoc.pacman.view.GameOverScreen
- show() - Method in class edu.uoc.pacman.view.GameScreen
- show() - Method in class edu.uoc.pacman.view.InterLevelsScreen
- show() - Method in class edu.uoc.pacman.view.WelcomeScreen
- SIZE_ERROR - Static variable in exception edu.uoc.pacman.model.exceptions.LevelException
-
Error message when the size of the board does not meet the minimum
- sprite - Variable in class edu.uoc.pacman.model.entities.Entity
-
Value of
Sprite
linked to the entity. - Sprite - Enum Class in edu.uoc.pacman.model.utils
-
Sprite that stores the configuration file symbol and the image's path.
- Sprite(char, String) - Constructor for enum class edu.uoc.pacman.model.utils.Sprite
-
Constructor with arguments.
- startPosition - Variable in class edu.uoc.pacman.model.entities.characters.Character
-
Stores the initial/start position of the character.
- state - Variable in class edu.uoc.pacman.model.entities.characters.pacman.Pacman
-
Stores the state of the Pacman.
- State - Enum Class in edu.uoc.pacman.model.entities.characters.pacman
-
Represents the three state which Pacman can have.
- State(int) - Constructor for enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
Constructor with arguments.
- symbol - Variable in enum class edu.uoc.pacman.model.utils.Sprite
-
Value in the configuration file.
T
- tick - Variable in class edu.uoc.pacman.model.Level
-
Number that allows us to manage when the actions happen.
- TILES_OFFSET - Static variable in class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseAmbush
-
The amount of tiles/cells/positions/steps that must be added to the Pacman's position.
- TILES_OFFSET - Static variable in class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChasePatrol
-
The amount of tiles/cells/positions/steps that must be added to the Pacman's position.
- TILES_TO_CHASE - Static variable in class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChaseCoward
-
Distance in tiles to decide which position is the target one.
- toString() - Method in class edu.uoc.pacman.model.entities.characters.Character
-
Represents this entity in a comma-separated string format.
Format is: "x,y,DIRECTION", where DIRECTION is uppercase enum type value.
Example: 4,5,LEFT - toString() - Method in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Returns a String with information of the Behaviour.
- toString() - Method in class edu.uoc.pacman.model.entities.characters.ghosts.Ghost
-
Represents this ghost in a comma-separated string format.
Format is: "x,y,DIRECTION,BEHAVIOUR:behaviourDuration".
DIRECTION is the uppercase enum type value forDirection
.
BEHAVIOUR is the uppercase enum type value forBehaviour
.
Example:
"2,3,UP,SCATTER,3" - toString() - Method in enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
Returns a String with information of the State.
Format: STATE:stateDuration
Example: "INVINCIBLE:5"
Hint: Remember that toString() is already coded in Object. - toString() - Method in class edu.uoc.pacman.model.utils.Position
-
Returns a comma-seperated string representation of a Position.
Format: "x,y"
Example: "3,4"
U
- UP - Enum constant in enum class edu.uoc.pacman.model.utils.Direction
-
UP direction. x = 0, y = -1 and keyCode = 19.
- update() - Method in class edu.uoc.pacman.controller.Game
-
Update the game, namely the level.
- update() - Method in class edu.uoc.pacman.model.Level
-
Refreshes/Updates the game when needed.
- UPDATE_GAME - Static variable in class edu.uoc.pacman.model.Level
-
It is the refresh time.
- UserInputProcessor - Class in edu.uoc.pacman.view
- UserInputProcessor(Game) - Constructor for class edu.uoc.pacman.view.UserInputProcessor
V
- valueOf(String) - Static method in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class edu.uoc.pacman.model.utils.Direction
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class edu.uoc.pacman.model.utils.Sprite
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class edu.uoc.pacman.model.entities.characters.ghosts.Behaviour
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class edu.uoc.pacman.model.entities.characters.pacman.State
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class edu.uoc.pacman.model.utils.Direction
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class edu.uoc.pacman.model.utils.Sprite
-
Returns an array containing the constants of this enum class, in the order they are declared.
- VECTOR_INCREASE - Static variable in class edu.uoc.pacman.model.entities.characters.ghosts.chase.ChasePatrol
-
The amount which the vector equals to targetPositionBlinky - FIRST_BLINKY_POSITION must be extended (multiplied).
W
- Wall - Class in edu.uoc.pacman.model.entities.items
-
Represents a wall in the labyrinth/map.
- Wall(Position) - Constructor for class edu.uoc.pacman.model.entities.items.Wall
-
Constructor with arguments.
The value forpathable
isfalse
and forsprite
isSprite.WALL
. - WALL - Enum constant in enum class edu.uoc.pacman.model.utils.Sprite
-
Sprite for a wall.
- wallAsset - Static variable in class edu.uoc.pacman.view.PacmanGame
- WelcomeScreen - Class in edu.uoc.pacman.view
- WelcomeScreen(PacmanGame) - Constructor for class edu.uoc.pacman.view.WelcomeScreen
- width - Variable in class edu.uoc.pacman.model.Level
-
The width of the map/labyrinth.
- WINDOW_HEIGHT - Static variable in class edu.uoc.pacman.view.PacmanGame
- WINDOW_WIDTH - Static variable in class edu.uoc.pacman.view.PacmanGame
X
- x - Variable in enum class edu.uoc.pacman.model.utils.Direction
-
Offset in X axis
- x - Variable in class edu.uoc.pacman.model.utils.Position
-
Value of the attribute X axis
Y
- y - Variable in enum class edu.uoc.pacman.model.utils.Direction
-
Offset in Y axis
- y - Variable in class edu.uoc.pacman.model.utils.Position
-
Value of the attribute Y axis
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form