diff --git a/README.md b/README.md index cf6b1e6..1ef64af 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ # Tetris ## Projet Informatique Encadré -### POO - objectif de modularité +POO - objectif de modularité + +# Diagramme activité proposé +![Diagramme activité proposé](readme_files/activiteTetris.svg) + +# Diagramme des classes final +![Diagramme classes final](readme_files/classDiagram.svg) --- Liens: - Slides de cours: https://partage.liris.cnrs.fr/index.php/s/7ZwqDcXbFrwsLPB - - Sujet du Tetris: https://partage.liris.cnrs.fr/index.php/s/wsyyzFDrRrjzCHw - -![Diagramme activité](readme_files/activiteTetris.svg) \ No newline at end of file + - Sujet du Tetris: https://partage.liris.cnrs.fr/index.php/s/wsyyzFDrRrjzCHw \ No newline at end of file diff --git a/readme_files/classDiagram.svg b/readme_files/classDiagram.svg new file mode 100644 index 0000000..2f3945f --- /dev/null +++ b/readme_files/classDiagram.svg @@ -0,0 +1 @@ +

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

«create»

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
pieceCourante 1
jeu 1
grille 1
musique 1
ordonnanceur 1
pieceSuivante 1
grille 1
jeu 1
musique 1
vueControle 1
jeu 1
grille 1
jeu 1
ordonnanceur 1
vueControle 1
vueGrille 1

App

String greeting

+ App()

+ main(String[]) : void

AppTest

+ AppTest()

~ appHasAGreeting() : void

«enumeration»

Direction

+ Direction()

+ values() : Direction[]

+ valueOf(String) : Direction

GridLayoutCarre

+ GridLayoutCarre(int, int)

+ addLayoutComponent(String, Component) : void

+ layoutContainer(Container) : void

+ preferredLayoutSize(Container) : Dimension

+ minimumLayoutSize(Container) : Dimension

+ removeLayoutComponent(Component) : void

+ GridLayoutCarre(int, int)

+ removeLayoutComponent(Component) : void

+ minimumLayoutSize(Container) : Dimension

+ preferredLayoutSize(Container) : Dimension

+ layoutContainer(Container) : void

+ addLayoutComponent(String, Component) : void

Grille

- int nbLignesSupprimees

- PieceCourante pieceCourante

+ int nbColonnes

- int score

- int pieceCouranteX

- int pieceCouranteY

- boolean[][] grille

- boolean enPause

+ int nbLignes

boolean[][] grille

int pieceCouranteX

boolean enPause

int score

int nbColonnes

int pieceCouranteY

int nbLignesSupprimees

int nbLignes

PieceCourante pieceCourante

+ Grille(int, int)

+ doitFixerPiece() : boolean

+ descendreLigne(int) : void

+ fixerPiece() : void

+ setCase(int, int, boolean) : void

+ verifierEtSupprimerLignesSiBesoin() : void

+ tournerPiece(Orientation) : void

+ getCase(int, int) : boolean

- calculerPositionApresRotation(Orientation) : List<Point>

- calculerNouvellePosition(List<Point>, int, int) : List<Point>

+ initGrille() : void

+ positionValide(List<Point>) : boolean

+ deplacerPiece(Direction) : void

+ reinitialiserGrille() : void

- deplacerPieceDroite() : void

- deplacerPieceToutEnBas() : void

+ estEnPause() : boolean

+ supprimerLigne(int) : void

- deplacerPieceGauche() : void

+ getLignePoints(int) : List<Point>

- deplacerPieceBas() : void

+ motifPieceCouranteColoriee() : List<Point>

+ peuxBouger(Direction, List<Point>) : boolean

+ peuxTournerPiece(Orientation) : boolean

IO

+ IO(Jeu)

+ keyPressed(KeyEvent) : void

+ keyTyped(KeyEvent) : void

+ keyReleased(KeyEvent) : void

Jeu

- PieceCourante pieceSuivante

- int pieceSuivanteY

- int pieceSuivanteX

- Grille grille

PieceCourante pieceSuivante

int pieceSuivanteX

Grille grille

PieceCourante nouvellePiece

int pieceSuivanteY

+ Jeu(Grille, Musique)

+ estFinPartie() : boolean

+ reinitialiserPartie() : void

+ pauseJeu() : void

+ reprendreJeu() : void

+ run() : void

+ finPartie() : void

Musique

+ Musique()

- initialiserClip() : void

+ start() : void

+ arreterMusique() : void

+ basculePlayPause() : void

Ordonnanceur

+ Ordonnanceur(Runnable, long)

+ stopOrdonnanceur() : void

+ run() : void

«enumeration»

Orientation

+ Orientation()

+ valueOf(String) : Orientation

+ values() : Orientation[]

«Interface»

PieceCourante

boolean[][] motif

+ rotationHoraire(boolean[][]) : boolean[][]

+ rotationAntiHoraire(boolean[][]) : boolean[][]

PieceI

- boolean[][] motif

boolean[][] motif

+ PieceI()

PieceJ

- boolean[][] motif

boolean[][] motif

+ PieceJ()

PieceL

- boolean[][] motif

boolean[][] motif

+ PieceL()

PieceO

- boolean[][] motif

boolean[][] motif

+ PieceO()

PieceS

- boolean[][] motif

boolean[][] motif

+ PieceS()

PieceT

- boolean[][] motif

boolean[][] motif

+ PieceT()

PieceZ

- boolean[][] motif

boolean[][] motif

+ PieceZ()

TetrisBandeauControleur

+ TetrisBandeauControleur(VueBandeauControle, Musique, Grille, Jeu)

+ switchPlayPause() : void

+ afficherAide() : void

+ setPartieTerminee() : void

VueBandeauControle

- JButton pauseButton

- JButton quitterButton

- JButton aideButton

- JPanel nextPiecePanel

- JButton relancerButton

JButton pauseButton

JButton aideButton

JButton quitterButton

JButton relancerButton

JPanel nextPiecePanel

int score

+ VueBandeauControle(Jeu)

+ afficherPieceSuivante(PieceCourante) : void

- initierNextPiecePanel() : void

+ update(Observable, Object) : void

VueGameOver

+ VueGameOver(int, ActionListener, Runnable)

VueGrille

+ VueGrille(Grille, Jeu)

- initialiserVueGrille() : void

+ resizeCases() : void

+ updateGrille() : void

+ run() : void

+ update(Observable, Object) : void

VueTetris

VueBandeauControle vueBandeauControle

+ VueTetris(Grille, Jeu)

\ No newline at end of file