-
Notifications
You must be signed in to change notification settings - Fork 0
/
mastermindSauvegardeAvantModif.puml
84 lines (71 loc) · 2.04 KB
/
mastermindSauvegardeAvantModif.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@startuml
skinparam style strictuml
skinparam classAttributeIconSize 0
hide enum methods
hide empty members
class model.Player {
- name : String
}
class controler.GameControler {
}
class view.GameWindow
class view.StartWindow
class view.EndWindow
enum model.Pawn {
+ RED
+ GREEN
+ YELLOW
+ BLUE
+ BLACK
+ ORANGE
+ PURPLE
+ PINK
}
class model.Round {
- finished : Boolean
- combinationLength : Integer
- attemptNumber : Integer
+ Round(combinationLength : Integer, attemptNumber : Integer, pawnNumber : Integer)
+ getRoundState() : Boolean
+ generateHintLine(combination : Combination) : HintLine
+ checkAttempt(combination : Combination) : Boolean
+ computeScore() : Integer
}
class model.SecretCombination extends model.Combination{
+ <<create>> SecretCombination(combinationLength : Integer, pawnNumber : Integer))
}
class model.Combination {
+ Combination(pawns : Pawn[])
+ getPawns() : Pawn[]
+ setPawns(pawns : Pawn[])
}
class model.HintLine {
+ setHints(hints : Hint[])
+ getHints() : Hint[]
}
class model.Game {
- score : Integer
- attemptNumber : Integer
- pawnNumber : Integer
- combinationLength : Integer
+ <<create>> Game()
+ startGame(roundNumber : Integer, combinationLength : Integer, pawnNumber : Integer, attemptNumber : Integer)
+ nextRound() : Round
+ getFinalScore() : Integer
}
enum model.Hint {
+ RIGHT_PLACE
+ WRONG_PLACE
+ ABSENT
}
model.Round *--> "1\n-secretCombination" model.SecretCombination : conserve >
model.Round o--> "1 .. 12\n-attempts" model.Combination : constitue <
model.Round o--> "1 .. 12\n-hintLine" model.HintLine : < compose
model.Round ..> "<<uses>>" model.Hint
model.Round ..> "<<uses>>" model.Pawn
model.HintLine o-> "2 .. 6\n-hints" model.Hint : contient >
model.Game *--> "1 .. 5\n-rounds" model.Round : contient >
model.Combination o-> "2 .. 6\n-pawns" model.Pawn : compose <
controler.GameControler *--> "1\n-game" model.Game
controler.GameControler o--> "1\n-round" model.Round
@enduml