2 Commits

6 changed files with 55 additions and 13 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 128 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -3,6 +3,28 @@ title: Avalam - Diagramme de classes (complet)
--- ---
classDiagram classDiagram
class ArenaGame{
+ArenaGame(IBoard board, AbstractGamePlayer bot1, AbstractGamePlayer bot2)
-createPlayerMap(AbstractGamePlayer bot1, AbstractGamePlayer bot2): EnumMap<Player, AbstractGamePlayer>
}
class ArenaWindow{
-resultsTable: JTable
-tableModel: DefaultTableModel
-results: List<string>
+ArenaWindows()
-createConfigPanel(): JPanel
-createResultsTable()
-showConfigDialog()
-runArena(String bot1Type, String bot2Type, int depth, int nbParties)
-createBot(String botType, Player player, int depth): AbstractGamePlayer
-getWinnerName(Result result, String bot1Type, String bot2Type): String
}
ArenaWindow *-- AvalamBoard
ArenaWindow *-- ArenaGame
class AvalamBoard{ class AvalamBoard{
+SIZE: int +SIZE: int
-MAX_HEIGHT: int -MAX_HEIGHT: int
@@ -43,8 +65,6 @@ classDiagram
+toString(): String +toString(): String
} }
class AvalamWindow{ class AvalamWindow{
-board : AvalamBoard -board : AvalamBoard
-scoreView : ScoreView -scoreView : ScoreView
@@ -70,14 +90,19 @@ classDiagram
AvalamWindow *-- BoardView AvalamWindow *-- BoardView
AvalamWindow *-- ScoreView AvalamWindow *-- ScoreView
AvalamWindow *-- TurnView AvalamWindow *-- TurnView
AvalamWindow *-- EndGameDialog
AvalamWindow --> GameMode AvalamWindow --> GameMode
class BackgroundLayer{
-img: Image
+BackgroundLayer(String resourcePath)
#paintComponent(Graphics g): void
}
class BoardLoader{ class BoardLoader{
+loadFromFile(String resourcePath): Tower[][] +loadFromFile(String resourcePath): Tower[][]
} }
class BoardView{ class BoardView{
-board: AvalamBoard -board: AvalamBoard
-backgroundLayer: BackgroundLayer -backgroundLayer: BackgroundLayer
@@ -105,14 +130,6 @@ classDiagram
BoardView *-- InteractionController BoardView *-- InteractionController
BoardView --> AvalamBoard BoardView --> AvalamBoard
class BackgroundLayer{
-img: Image
+BackgroundLayer(String resourcePath)
#paintComponent(Graphics g): void
}
class Color{ class Color{
-YELLOW(int r, int g, int b) -YELLOW(int r, int g, int b)
-RED(int r, int g, int b) -RED(int r, int g, int b)
@@ -122,11 +139,17 @@ classDiagram
+toPlayer(): fr.iut_fbleau.GameAPI.Player +toPlayer(): fr.iut_fbleau.GameAPI.Player
} }
class EndGameDialog{
+EndGameDialog(JFrame parent, Result result, int scoreJaune, int scoreRouge, GameMode mode, int depth, Runnable onReplay, Runnable onMenu, Runnable onQuit)
-modeToString(GameMode mode, int depth): String
}
class GameMode{ class GameMode{
PVP PVP
PVBOT PVBOT
PVALPHA PVALPHA
PVGOD PVGOD
ARENA
} }
class HighlightLayer{ class HighlightLayer{
@@ -165,6 +188,7 @@ classDiagram
Main ..> AvalamWindow Main ..> AvalamWindow
Main ..> GameMode Main ..> GameMode
Main ..> ArenaWindow
class PieceButton{ class PieceButton{
-color: java.awt.Color -color: java.awt.Color

View File

@@ -17,7 +17,16 @@ classDiagram
} }
class DivineBot{ class DivineBot{
-me: Player
-maxDepth: int
-rng: Random
+DivineBot(Player p, int maxDepth)
+giveYourMove(IBoard board): AbstractPly
-alphaBeta(IBoard board, int depth, int alpha, int beta): int
-terminalValue(IBoard board): int
-evaluate(IBoard board): int
-listMoves(IBoard board): List<AbstractPly>
} }
class IdiotBot{ class IdiotBot{