You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Clément FRÉVILLE
65d0453206
continuous-integration/drone/push Build is passing
Details
|
1 year ago | |
---|---|---|
src | 1 year ago | |
.drone.yml | 1 year ago | |
.gitignore | 2 years ago | |
README.md | 2 years ago | |
pom.xml | 1 year ago |
README.md
Morpion
Diagramme de classes
classDiagram
class Position {
-x : int
-y : int
+x() int
+y() int
}
class Board {
-width : int
-height : int
+place(p : Placed)
+isOccupied() bool
+get(p : Position) Tile
+isBound(p : Position) bool
+isFull() bool
}
class Tile {
}
<<interface>> Tile
Empty <|-- Tile
Placed <|-- Tile
class Placed {
-value : char
+value() char
}
Tile "*" <-- Board
class Game {
-board : Board
-players : List~Player~
-currentPlayer : int
+board() Board
+currentPlayer() Player
+nextPlayer()
+placeCurrent(p : Position) MoveResult
+players() List~Player~
}
Board <-- Game
class MoveResult {
}
<<interface>> MoveResult
class Result {
-wins : List~Win~
}
class CantPlace {
}
Result <|-- MoveResult
CantPlace <|-- MoveResult
class Win {
-positions : List~Position~
+positions() List~Position~
}
class WinChecker {
+detectFrom(b : Board, p : Position) List~Win~
}
<<interface>> WinChecker
Win <.. WinChecker
Position <.. Win
Position <.. Board
MoveResult <.. Game