Letzte Änderungen
parent
4284c262e2
commit
af277a5fab
|
@ -7,6 +7,7 @@
|
|||
<groupId>org.example</groupId>
|
||||
<artifactId>HitoriTeamProjekt</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
|
@ -44,6 +45,15 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.11.0</version>
|
||||
<configuration>
|
||||
<source>21</source> <!-- Java-Version -->
|
||||
<target>21</target> <!-- Java-Version -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
|
@ -51,7 +61,6 @@
|
|||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>PR2.HitoriSpiel.Main.Main</mainClass> <!-- Vollqualifizierter Name deiner Main-Klasse -->
|
||||
</manifest>
|
||||
</archive>
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
@startuml
|
||||
package PR2.HitoriSpiel.Domain {
|
||||
class Action {
|
||||
- int row
|
||||
- int col
|
||||
- String oldState
|
||||
- String newState
|
||||
+ getRow(): int
|
||||
+ getCol(): int
|
||||
+ getOldState(): String
|
||||
+ getNewState(): String
|
||||
}
|
||||
|
||||
class HitoriBoard {
|
||||
- int[][] numbers
|
||||
- List<String> solutionCoordinates
|
||||
- String boardName
|
||||
+ getNumbers(): int[][]
|
||||
+ setNumbers(int[][] numbers): void
|
||||
+ getCell(int row, int col): HitoriCell
|
||||
+ resetBoard(): void
|
||||
}
|
||||
|
||||
class HitoriCell {
|
||||
- int number
|
||||
- CellState state
|
||||
+ getNumber(): int
|
||||
+ getState(): CellState
|
||||
+ setState(CellState state): void
|
||||
}
|
||||
|
||||
class HitoriValidator {
|
||||
- HitoriBoard board
|
||||
+ validateBoard(List<String> solution): boolean
|
||||
}
|
||||
|
||||
class StateFileManager {
|
||||
+ saveState(Stack<Action> undoStack, Stack<Action> redoStack): void
|
||||
+ loadState(Stack<Action> undoStack, Stack<Action> redoStack): void
|
||||
}
|
||||
}
|
||||
|
||||
package PR2.HitoriSpiel.Fassade {
|
||||
class GameBoard {
|
||||
- HitoriBoard board
|
||||
- Timer timer
|
||||
- long startTime
|
||||
- long pausedTime
|
||||
+ startTimer(): void
|
||||
+ stopTimer(): void
|
||||
+ resumeTimer(): void
|
||||
+ resetBoard(): void
|
||||
}
|
||||
|
||||
class StateManager {
|
||||
- Stack<Action> undoStack
|
||||
- Stack<Action> redoStack
|
||||
+ saveAction(int row, int col, String oldState, String newState): void
|
||||
+ undo(): Action
|
||||
+ redo(): Action
|
||||
}
|
||||
|
||||
class Setup {
|
||||
+ stylePanel(JPanel panel): void
|
||||
+ styleLabel(JLabel label): void
|
||||
+ createButton(String text, int width, int height): JButton
|
||||
}
|
||||
|
||||
class HighscoreManager {
|
||||
- List<Highscore> highscoreList
|
||||
+ addHighscore(String playerName, int score, String boardName, int errors): void
|
||||
+ getHighscoresForBoard(String boardName): List<Highscore>
|
||||
}
|
||||
}
|
||||
|
||||
package PR2.HitoriSpiel.GUI {
|
||||
class BoardLoader {
|
||||
+ loadBoardsAsList(): List<String>
|
||||
+ loadBoard(String resourcePath): int[][]
|
||||
}
|
||||
|
||||
class HighscoreDialog {
|
||||
- HighscoreManager highscoreManager
|
||||
- DefaultTableModel tableModel
|
||||
+ HighscoreDialog(JFrame parentFrame, List<String> boardNames)
|
||||
}
|
||||
|
||||
class PauseMenu {
|
||||
- GameBoard gameBoard
|
||||
+ PauseMenu(JFrame parent, GameBoard gameBoard, ActionListener resumeAction, ActionListener mainMenuAction, ActionListener exitAction)
|
||||
}
|
||||
|
||||
class StartMenu {
|
||||
+ selectBoard(): void
|
||||
+ randomBoard(): void
|
||||
+ highscorelist(): void
|
||||
}
|
||||
}
|
||||
|
||||
package PR2.HitoriSpiel.Main {
|
||||
class Main {
|
||||
+ main(String[] args): void
|
||||
}
|
||||
}
|
||||
|
||||
PR2.HitoriSpiel.Domain.HitoriBoard "1" *-- "many" PR2.HitoriSpiel.Domain.HitoriCell
|
||||
PR2.HitoriSpiel.Domain.StateManager "1" *-- "many" PR2.HitoriSpiel.Domain.Action
|
||||
PR2.HitoriSpiel.Fassade.GameBoard "1" *-- "1" PR2.HitoriSpiel.Domain.HitoriBoard
|
||||
PR2.HitoriSpiel.GUI.BoardLoader ..> PR2.HitoriSpiel.Domain.HitoriBoard
|
||||
PR2.HitoriSpiel.GUI.HighscoreDialog ..> PR2.HitoriSpiel.Fassade.HighscoreManager
|
||||
PR2.HitoriSpiel.GUI.PauseMenu --> PR2.HitoriSpiel.Fassade.GameBoard
|
||||
PR2.HitoriSpiel.GUI.StartMenu --> PR2.HitoriSpiel.GUI.BoardLoader
|
||||
@enduml
|
Loading…
Reference in New Issue