From 450e27ab0026446f669c725d371cfa8cb52cf40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Mon, 2 Dec 2024 10:11:11 +0100 Subject: [PATCH] docs(uml): add class diagram (#7) --- uml/class-diagram.puml | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 uml/class-diagram.puml diff --git a/uml/class-diagram.puml b/uml/class-diagram.puml new file mode 100644 index 0000000..e6aa42e --- /dev/null +++ b/uml/class-diagram.puml @@ -0,0 +1,50 @@ +@startuml Geometry Dash - Diagramme de classe + +skinparam style strictuml +skinparam classAttributeIconSize 0 +skinparam classFontStyle Bold +hide enum methods + +class Position { + {field} + column: Integer + {field} + row: Integer + + {method} + Position(column: Integer, row: Integer) + {method} + equals(position: Position) +} + +class Level { + {field} + songPath: String + {field} + backgroundPath: String + {field} + speed: Double + + {method} + Level() +} +Level *--> "*\n- grid" GameObject : <> + +abstract class GameObject { + {method} + getImagePath(): String {abstract} + {method} + safeSides(): List {abstract} +} +GameObject o--> "1\n- " Position : <> +GameObject ..> PositionSide : <> + +class Spike extends GameObject {} + +class Game { + {field} - score: Integer + + {method} + start(): void + {method} + restart(): void + {method} + end(): void +} +Game o--> "1\n- currentLevel" Level : <> + +enum PositionSide <> { + TOP + RIGHT + BOTTOM + LEFT +} + +@enduml