Files
SAE31_2024/Documentation/DiagrammeUML/Game/Diagram_game.puml

193 lines
4.7 KiB
Plaintext

@startuml
class fr.monkhanny.dorfromantik.game.CustomKeyAdapter {
- Board board
+ <<Create>> CustomKeyAdapter(Board)
+ void keyPressed(KeyEvent)
}
class fr.monkhanny.dorfromantik.game.ScoreManager {
- List<Pocket> pockets
- int currentScore
+ <<Create>> ScoreManager()
+ void addTile(Tile)
- Pocket findPocketForTile(Tile,Biome)
- void recalculateScore()
+ int getCurrentScore()
}
class fr.monkhanny.dorfromantik.game.EscapeMenu {
- JButton resumeButton
- JButton mainMenuButton
- JButton settingsButton
+ <<Create>> EscapeMenu(JFrame,Game)
- JButton createButton(String)
+ void setResumeButtonListener(ActionListener)
+ void setQuitButtonListener(ActionListener)
+ void setSettingsButtonListener(ActionListener)
+ void setMenuVisible(boolean)
}
class fr.monkhanny.dorfromantik.game.Cell {
- Board board
+ int x
+ int y
+ int radius
+ <<Create>> Cell(Board,int,int,int)
+ Board getBoard()
+ int getXCoord()
+ int getYCoord()
+ int getRadius()
+ {static} double to360Degrees(double)
+ void setPosition(int,int)
# void paintComponent(Graphics)
}
class fr.monkhanny.dorfromantik.game.Game {
- Random random
+ <<Create>> Game(long)
+ <<Create>> Game()
+ int getRandomInt(int)
}
class fr.monkhanny.dorfromantik.game.TilePanningTransition {
- Board board
- int targetOffsetX
- int steps
+ <<Create>> TilePanningTransition(Board,int,int,int)
+ void start()
}
class fr.monkhanny.dorfromantik.game.RemainingTilesIndicator {
- int remainingTiles
- int maxTiles
+ <<Create>> RemainingTilesIndicator(int)
+ void setRemainingTiles(int)
+ void draw(Graphics,int,int)
+ int getTotalHeight()
- Polygon createHexagon(int,int,int,int)
}
class fr.monkhanny.dorfromantik.game.CustomMouseMotionAdapter {
- Board board
+ <<Create>> CustomMouseMotionAdapter(Board)
+ void mouseMoved(MouseEvent)
}
class fr.monkhanny.dorfromantik.game.Tile {
- HashMap<TileOrientation,Biome> sideBiomes
+ <<Create>> Tile(Board,int,int,int,Biome)
+ <<Create>> Tile(Board,int,int,int)
+ <<Create>> Tile(Board,Point,int,Biome)
+ <<Create>> Tile(Board,Point,int)
+ void setBiomes(Biome)
+ void assignRandomBiomes()
+ Biome getBiome(TileOrientation)
+ Biome getDominantBiome()
+ Biome[] getBiomes()
+ void rotate(boolean)
+ boolean containsBiome(Biome)
+ boolean isAdjacentTo(Tile)
+ Tile getNeighbor(TileOrientation)
+ TileOrientation determineSide(int,int)
# void drawTileAt(Graphics,int,int,float)
# void paintTile(Graphics,float)
}
class fr.monkhanny.dorfromantik.game.ScoreDisplay {
- int score
- Font font
- int x
+ <<Create>> ScoreDisplay(Font,int,int)
+ void setScore(int)
+ void setPosition(int,int)
+ void draw(Graphics)
}
class fr.monkhanny.dorfromantik.game.Pocket {
- Biome biome
- Set<Tile> tiles
+ <<Create>> Pocket(Biome)
+ void addTile(Tile)
+ int getSize()
+ Biome getBiome()
+ Set<Tile> getTiles()
}
class fr.monkhanny.dorfromantik.game.Board {
- List<Tile> tiles
- List<Point> availablePositions
- Random random
- Game game
- JFrame gameFrame
- Tile centralTile
- double zoomFactor
- int offsetX
- int offsetY
- Tile nextTile
- Point mousePosition
- int currentScore
- Database database
- RemainingTilesIndicator remainingTilesIndicator
- GameControlsMenu controlsMenu
- ScoreManager scoreManager
- ScoreDisplay scoreDisplay
+ <<Create>> Board(JFrame,long)
+ GameControlsMenu getControlsMenu()
+ void handleMouseMove(java.awt.event.MouseEvent)
- void initializeNextTile()
+ Tile getNextTile()
+ void handleSpaceKeyPress()
+ void handleMouseClick(java.awt.event.MouseEvent)
- void initializeCentralTile()
+ void addTile(Tile)
+ Tile getTileAt(int,int)
+ Random getRandom()
+ Game getGame()
- void calculateAvailablePositions(Tile)
- boolean isTileAtPosition(Point)
+ void placeTileAtPosition(Point)
+ void autoReFocus(Tile)
+ double getZoomFactor()
+ void setZoomFactor(double)
+ int getOffsetX()
+ void setOffsetX(int)
+ int getOffsetY()
+ void setOffsetY(int)
+ void zoomIn()
+ void zoomOut()
+ void moveBoard(int,int)
+ void paintComponent(Graphics)
}
class fr.monkhanny.dorfromantik.game.PauseGame {
- EscapeMenu escapeMenu
- GameResumeButtonListener resumeButtonListener
- GameQuitButtonListener quitButtonListener
- GameSettingsButtonListener settingsButtonListener
+ <<Create>> PauseGame(JFrame,Game)
+ void keyPressed(KeyEvent)
}
java.awt.event.KeyAdapter <|-- fr.monkhanny.dorfromantik.game.CustomKeyAdapter
fr.monkhanny.dorfromantik.game.JFrame <|-- fr.monkhanny.dorfromantik.game.EscapeMenu
fr.monkhanny.dorfromantik.game.JComponent <|-- fr.monkhanny.dorfromantik.game.Cell
java.awt.event.MouseMotionAdapter <|-- fr.monkhanny.dorfromantik.game.CustomMouseMotionAdapter
fr.monkhanny.dorfromantik.game.Cell <|-- fr.monkhanny.dorfromantik.game.Tile
fr.monkhanny.dorfromantik.game.JPanel <|-- fr.monkhanny.dorfromantik.game.Board
java.awt.event.KeyAdapter <|-- fr.monkhanny.dorfromantik.game.PauseGame
@enduml