diff --git a/Diagramme-de-paquetages.md b/Diagramme-de-paquetages.md deleted file mode 100644 index 64403ba..0000000 --- a/Diagramme-de-paquetages.md +++ /dev/null @@ -1,64 +0,0 @@ -```plantuml -@startuml -skinparam linetype polyline -skinparam linetype ortho -package "Qwirkle" { - package "Boards" { - class Board - class Cell - } - - package "Games" { - class Game - interface IPlayer - interface IRules - } - - package "Players" { - class Player - class Score - class LeaderBoard - } - - package "Tiles" { - class Tile - class TileBag - enum Color - enum Shape - } - - package "Events" { - class AddPlayerNotifiedEventArgs - class EndOfGameNotifiedEventArgs - class NextPlayerNotifiedEventArgs - class PlaceTileNotifiedEventArgs - } - - package "Program" { - } - - Cell <--* Board - - IPlayer ..|> Game - IRules ..|> Game - - Score <--* LeaderBoard - - Tile <--* TileBag - Tile --> Color - Tile --> Shape - - Program ..> Boards : <> - Program ..> Games : <> - Program ..> Players : <> - Program ..> Tiles : <> - Program ..> Events : <> - - Games ..> Boards : <> - Games ..> Players : <> - Games ..> Tiles : <> - Games ..> Events : <> - Boards ..> Tiles : <> - Players ..> Tiles : <> -} -@enduml \ No newline at end of file diff --git a/SAE201_ClassDiagram.svg b/SAE201_ClassDiagram.svg index 4083260..1c48c41 100644 --- a/SAE201_ClassDiagram.svg +++ b/SAE201_ClassDiagram.svg @@ -1,4 +1,4 @@ -
Game
Game
- scoreBoard : Dictionary<Player, int>
- scoreBoard : Dictionary<Player, int>
+ GameRunning : bool
+ GameRunning : bool
+ Game()
+ Game()
+ AddPlayerInGame(playerTag: string): bool
+ AddPlayerInGame(playerTag: string): bo...
+ GetBoard(): Board
+ GetBoard(): Board
+ StartGame(): bool
+ StartGame(): bool
+ AddCellUsed(c: Cell)
+ AddCellUsed(c: Cell)
+ EmptyCellUsed()
+ EmptyCellUsed()
+ GetPlayingPlayer(): Player
+ GetPlayingPlayer(): Player
+ GetPlayingPlayerPosition(): int
+ GetPlayingPlayerPosition(): int
+ TileOfPlayerWithPos(postile: int): Tile
+ TileOfPlayerWithPos(postile: int): Tile
+ GiveTilesToPlayers()
+ GiveTilesToPlayers()
+ TileOfPlayerWithPos(postile: int): Tile
+ TileOfPlayerWithPos(postile: int): Tile
Player
Player
+ NameTag: string
+ NameTag: string
+ IsPlaying: bool
+ IsPlaying: bool
+ Player(name: string)
+ Player(name: string)
+ AddTileToPlayer(tile: Tile)
+ AddTileToPlayer(tile: Tile)
+ RemoveTileToPlayer(tile: Tile)
+ RemoveTileToPlayer(tile: Til...
Tile
Tile
- shape: Shape
- shape: Shape
- color: Color
- color: Color
+ GetShape: Shape
+ GetShape: Shape
+ GetColor: Color
+ GetColor: Color
+ Tile(sh: Shape, co: Color)
+ Tile(sh: Shape, co: Col...
+ NameColorTile(): string
+ NameColorTile(): string
+ ToString(): string
+ ToString(): string
TileBag
TileBag
+ TileBag(nbSet: int)
+ TileBag(nbSet: int)
+ AddTileInBag(tile: Tile)
+ AddTileInBag(tile: Tile)
+ RemoveTileInBag(tile: Tile)
+ RemoveTileInBag(tile: Til...

<<Interface>>
IPlayer


+ CreatePlayer(playerTag: string): Player


+ SetNextPlayer(): string


+ SetFirstPlayer(): string


+ PlaceTile(player: Player, tile: Tile, x: int, y: int): bool


+ DrawTiles(player: Player): bool


+ SwapTiles(player: Player, tilesToSwap: List<Tile>): bool


+ GetPlayerScore(player: Player, cellsPlayed ReadOnlyCollection<Cell>, b: Board): int

<<Interface>>...

<<Interface>>
IRules


+ CreateBoard(): Board


+ CreateTileBag(nbSet: int): TileBag


+ IsMoveCorrect(t: Tile, x: int, y: int, b: Board): bool


+ CheckExtendedSurroundingTiles(tile: Tile, x: int, y: int, dx: int, dy: int, b: Board): bool


+ CheckTilesInLine(cells: List<Cell>, b: Board, x: int, y: int): bool


+ IsGameOver();

<<Interface>>...
Board
Board
+ Rows: int
+ Rows: int
+ Columns: int
+ Columns: int
+ Board(rows: int, cols: int)
+ Board(rows: int, cols: int)
+ HasOccupiedCase(): bool
+ HasOccupiedCase(): bool
+ AddTileInCell(x: int, y: int, tile: Tile)
+ AddTileInCell(x: int, y: int, tile: Tile)
+ GetCells(): List<Cell>
+ GetCells(): List<Cell>
+ GetReadCells(): IReadOnlyCollection<Cell>
+ GetReadCells(): IReadOnlyCollection<Cell>
+ GetCell(): Cell
+ GetCell(): Cell

<<Struct>>
Score


- PlayerScore: int


+ PlayerTag: string



+ Score(p: Player)

<<Struct>>...
Cell
Cell
- x: int
- x: int
- y: int
- y: int
+ GetX: int
+ GetX: int
+ GetY: int
+ GetY: int
+ GetTile: Tile
+ GetTile: Tile
+ IsFree: bool
+ IsFree: bool
+ Cell(x: int, y: int)
+ Cell(x: int, y: int)
+ SetTile(addedTile: Tile)
+ SetTile(addedTile: Ti...

<<Enum>>
Color


Red

Blue

Green

Yellow

Orange

Purple

<<Enum>>...

<<Enum>>
Shape


Square

Round

Rhombus

Club

Shuriken

Star

<<Enum>>...
1
1
-*playerTiles
-*playerTiles
-*board
-*board
-*tileBag
-*tileBag
1
1
-*players
-*players
-*tiles
-*tiles
1
1
-*tile
-*tile
1
1
-*cells
-*cells
\ No newline at end of file +
Game
- scoreBoard : Dictionary<Player, int>
+ GameRunning : bool
+ Game()
+ AddPlayerInGame(playerTag: string): bool
+ GetBoard(): Board
+ StartGame(): bool
+ AddCellUsed(c: Cell)
+ EmptyCellUsed()
+ GetPlayingPlayer(): Player
+ GetPlayingPlayerPosition(): int
+ TileOfPlayerWithPos(postile: int): Tile
+ GiveTilesToPlayers()
+ TileOfPlayerWithPos(postile: int): Tile
Player
+ NameTag: string
+ IsPlaying: bool
+ Player(name: string)
+ AddTileToPlayer(tile: Tile)
+ RemoveTileToPlayer(tile: Tile)
Tile
- shape: Shape
- color: Color
+ GetShape: Shape
+ GetColor: Color
+ Tile(sh: Shape, co: Color)
+ NameColorTile(): string
+ ToString(): string
TileBag
+ TileBag(nbSet: int)
+ AddTileInBag(tile: Tile)
+ RemoveTileInBag(tile: Tile)

<<Interface>>
IPlayer


+ CreatePlayer(playerTag: string): Player


+ SetNextPlayer(): string


+ SetFirstPlayer(): string


+ PlaceTile(player: Player, tile: Tile, x: int, y: int): bool


+ DrawTiles(player: Player): bool


+ SwapTiles(player: Player, tilesToSwap: List<Tile>): bool


+ GetPlayerScore(player: Player, cellsPlayed ReadOnlyCollection<Cell>, b: Board): int

<<Interface>>
IRules


+ CreateBoard(): Board


+ CreateTileBag(nbSet: int): TileBag


+ IsMoveCorrect(t: Tile, x: int, y: int, b: Board): bool


+ CheckExtendedSurroundingTiles(tile: Tile, x: int, y: int, dx: int, dy: int, b: Board): bool


+ CheckTilesInLine(cells: List<Cell>, b: Board, x: int, y: int): bool


+ IsGameOver();

Board
+ Rows: int
+ Columns: int
+ Board(rows: int, cols: int)
+ HasOccupiedCase(): bool
+ AddTileInCell(x: int, y: int, tile: Tile)
+ GetCells(): List<Cell>
+ GetReadCells(): IReadOnlyCollection<Cell>
+ GetCell(): Cell
Cell
- x: int
- y: int
+ GetX: int
+ GetY: int
+ GetTile: Tile
+ IsFree: bool
+ Cell(x: int, y: int)
+ SetTile(addedTile: Tile)

<<Enum>>
Color


Red

Blue

Green

Yellow

Orange

Purple

<<Enum>>
Shape


Square

Round

Rhombus

Club

Shuriken

Star

1
-*playerTiles
-*board
-*tileBag
1
-*players
-*tiles
1
-*tile
1
-*cells
Score
+ PlayerName: string
+ Date: DateTime
+ Points: int
+ Victories : int
+ Score(playerName: string, date: DateTime, points: int, victories: int)
+ ToString(): string
Leaderboard
+ Leaderboard()
+ IsPlayerIn(player: Player): int
+ AddPlayerInLeaderboard(scoreBoard: ReadOnlyDictionary<Player, int>)
-*Lb
AddPlayerNotifiedEventArgs
+ ReturnedNotified: string
+ AddPlayerNotifiedEventArgs(returnedNotified: string)
EndOfGameNotifiedEventArgs
+ Player: Player
EndOfGameNotifiedEventArgs(player: Player)
NextPlayerNotifiedEventArgs
+ Player: Player
NextPlayerNotifiedEventArgs(player: Player)
PlaceTileNotifiedEventArgs
+ Tile: Tile
+ Reason: string
PlaceTileNotifiedEventArgs(tile: Tile, reason: string)
\ No newline at end of file