File tree Expand file tree Collapse file tree 4 files changed +173
-54
lines changed Expand file tree Collapse file tree 4 files changed +173
-54
lines changed Original file line number Diff line number Diff line change @@ -1543,4 +1543,39 @@ Modification de la prise en compte de la touche Espace
1543
1543
Vitesse du serpent, enregistrement des scores...
1544
1544
1545
1545
Modification des mots clés var en let ou const
1546
- Fonctions fléchées...
1546
+ Fonctions fléchées...
1547
+
1548
+ # Diagrammes
1549
+
1550
+ ## Diagramme de classe
1551
+
1552
+ ``` plantuml
1553
+ @startuml
1554
+ 'https://plantuml.com/class-diagram
1555
+
1556
+
1557
+ class Snake {
1558
+ Array body
1559
+ string direction
1560
+ boolean ateApple false
1561
+
1562
+ constructor(Array body, string direction): Snake
1563
+ draw(): void
1564
+ move(): void
1565
+ setDirection(string newDirection): void
1566
+ checkCollision(): boolean
1567
+ isEatingApple(apple): boolean
1568
+ }
1569
+
1570
+ class Apple {
1571
+ Array position
1572
+
1573
+ constructor(Array position): Apple
1574
+ draw(): void
1575
+ setNewPosition(): void
1576
+ isOnSnake( Snake ): boolean
1577
+ isEatingApple(apple): boolean
1578
+ }
1579
+
1580
+ @enduml
1581
+ ```
Original file line number Diff line number Diff line change
1
+ @startuml
2
+ 'https://plantuml.com/class-diagram
3
+
4
+
5
+ class Snake {
6
+ Array body
7
+ string direction
8
+ boolean ateApple false
9
+
10
+ constructor(Array body, string direction): Snake
11
+ draw (): void
12
+ move (): void
13
+ setDirection(string newDirection): void
14
+ checkCollision (): boolean
15
+ isEatingApple(apple): boolean
16
+ }
17
+
18
+ class Apple {
19
+ Array position
20
+
21
+ constructor(Array position): Apple
22
+ draw (): void
23
+ setNewPosition (): void
24
+ isOnSnake( Snake ): boolean
25
+ isEatingApple(apple): boolean
26
+ }
27
+
28
+ @enduml
You can’t perform that action at this time.
0 commit comments