0% found this document useful (0 votes)
96 views1 page

CST 338 - Final Project - Uml Diagram

This document describes several classes used in a game application: ImageLoader loads and manages game images for different screens. GameView controls the game board display and handles switching between screens and updating game state. GameWindow initializes the main window and allows setting the game screen. SoundSystem plays audio for different game events.

Uploaded by

api-428315790
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views1 page

CST 338 - Final Project - Uml Diagram

This document describes several classes used in a game application: ImageLoader loads and manages game images for different screens. GameView controls the game board display and handles switching between screens and updating game state. GameWindow initializes the main window and allows setting the game screen. SoundSystem plays audio for different game events.

Uploaded by

api-428315790
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ImageLoader

+ frameIconImage : String
+ titleScreenImage : String
+ instructionScreenImage : String
+ gameScreenImage : String
+ gameOverScreenImage : String
+ gameWinScreenOneImage : String
+ gameWinScreenTwoImage : String
- screenFile : String
- heartValues : ArrayList<String>

+ getPlayerHeartsIcon(int) : ImageIcon
+ imageToAdd(String) : JLabel
+ getImageAsBuffered(fString) : BufferedImage

GameView

- tilesPerRow : int
- gameModel : GameModel
- gameWindow : GameWindow
- gameTiles : JButton[][]
GameWindow

- buttonScreen : JButton + GameView(GameModel)


- gameScreen : JPanel + getGameWindow() : GameWindow
+ switchToInstructions(ActionListener) : void
1 + switchToGame() : void 1
JFrame + GameWindow()
+ receiveTitleSwitchListener (ActionListener) : void
+ setButtonScreen(JLabel) : JButton
+ receiveGameTileListener(ActionListener) : void
+ getButtonScreen() : JButton
+ setGameScreen(BufferedImage) : JPanel + drawPlayer(Player) : void
+ getGameScreen() : JPanel + drawMonsters(ArrayList<GameCharacter>) : void
- initGameWindow() : void + updateBoard() : void
+ switchToGameOver(ActionListener) : void
+ switchToGameWin(ActionListener) : void
+ switchToGameWinTwo(ActionListener) : void
+ updatePlayerHealth() : void
- setGameTiles() : void
- addGameTilesToGame(JPanel) : void
SoundSystem

- soundFile : string
- playerHitFile : File InstructionSwitchListener
- enemyHitFile : File
- necroLaughFile : File
- introFile : File Updates 1
- gameThemeFile : File
- gameWinFile : File + actionPerformed(ActionEvent) : void
- playerHit : Clip GameController
<<interface>> <<interface>> <<interface>>
IMovementComponent IVitalityComponent ICombatComponent + getPlayerHit() : Clip
+ getEnemyHit() : Clip - gameView : GameView
+ getMoveSpeed() : int + getMaxHealth() : int + getNecroLaugh() : Clip - gameModel : GameModel GameTileListener
+ getCoords() : int[] + getHealth() : int + getAttackPower() : int + getIntro() : Clip - currentTheme : Clip
+ move(int, int) : void + takeDamage(int) : void + attack() : int + getGameTheme() : Clip
+ ableToMove() : boolean + isAlive() : boolean + getGameWin() : Clip
- makeClip(File, Clip) : Clip
- makeSoundEffect(File, Clip) : Clip + GameController(GameView, GameModel)
+ actionPerformed(ActionEvent) : void

1 Updates

GameOverListener

GameCharacter LevelCreator GameModel

# moveRemaining : int + maxLevel : int


- startingMonsters : int
# xPos : int - playerHasAttacked : boolean + actionPerformed(ActionEvent) : void
- monsterIncrease : int
# yPos : int - gameBoard : GameBoard <<interface>>
- maxMonsters : int
- maxHealth : int - currentLevel : int ActionListener
- mothFrequency : int
- health : int - player : Player
- wightFrequency : int
- moveSpeed : int
- spawnLocations : ArrayList<int[]>
- attackPower : int + GameModel()
GameWinListener
- alive : boolean + getPlayer() : Player
- sprite : ImageIcon + generateLevel(int) : ArrayList<GameCharacter> + getMonsters() : ArrayList<GameCharacter>
- resetSpawnLocations() : void + getGameBoard() : GameBoard
+ GameCharacter(int, int, int, int, int, ImageIcon) + getCurrentLevel() : int
+ GameCharacter(GameCharacter) + advanceLevel() : void
+ getMaxHealth() : int + checkAttack(int, int, GameCharacter) : boolean + actionPerformed(ActionEvent) : void
+ getHealth() : int + monsterTurn() : void
+ getMoveSpeed() : int 1 + playerAttack(int, int) : void
+ getCoords() : int[] GameBoard + playerMove(int, int) : void
+ getAttackPower() : int 0..* + playerTurnOver() : boolean
+ isAlive() : boolean - characters : Map<String, GameCharacter> + resetPlayerTurn() : void
- numberOfMonsters : int TitleSwitchListener
+ getSprite() : ImageIcon + tileEmpty(int, int) : boolean
+ takeDamage(int) : void + gameOver() : boolean
+ ableToMove() : boolean + GameBoard(ArrayList<GameCharacter>) + levelWon() : boolean
+ newTurn() : void + coordsAsString(int[]) : String - isAdjacentTile(int, int, GameCharacter) : boolean
+ coordsAsInts(String) : int[] - generateRandomMove(int, int) : int[]
+ move(int, int) : void
+ getCharacterAtCoords(int, int) : GameCharacter - moveCloserToPlayer(int, int) : int[] + actionPerformed(ActionEvent) : void
+ attack() : int
- dead() : void + isOccupied(int, int) : boolean - playerAlone() : boolean
+ isOpen(int, int) : boolean
+ getNumberOfMonsters() : int
+ removeMonster(int, int) : void
+ resetBoard() : void GameWinTwoListener
+ getBoard() : Map<String, GameCharacter> 1
- fillCharacters(ArrayList<GameCharacter>) : void

+ actionPerformed(ActionEvent) : void

Moth Wight Player

+ Player()
+ Player(int, int)
+ Moth(int, int) + Wight(int, int) + move(int, int) : void <<override>>
+ move(int, int) : void <<override>> + move(int, int) : void <<override>> + attack() : int <<override>>
+ attack() : int <<override>> + attack() : int <<override>> + getXPos() : int
+ getYPos() : int

SpriteGenerator

+ spriteList : Map<String, ImageIcon>


- spriteLabels : String[]
- spritesLoaded : boolean

+ loadSprites() : void
+ getSprite(String) : ImageIcon

You might also like