Player Classes
%%{init: {"theme": "default"}%%
classDiagram
direction TB
Avatars --> Player : sets avatar
Names --> Player: sets name
Colors --> Player : sets color
class Avatars {
+ static enum AvatarType
+ static List~AvatarType~ all
+ static List~AvatarType~ males
+ static List~AvatarType~ females
+ static getRandom(): AvatarType
+ static getRandomMale(): AvatarType
+ static getRandomFemale(): AvatarType
}
Avatars *--> AvatarType
class AvatarType {
<<enumeration>>
...avatars
}
class Colors {
+ static enum ColorType
+ static ColorType unconquered
+ static ColorType unplayable
+ static List~ColorType~ playableColorsList
+ ColorType getRandomPlayable()
}
Colors *--> ColorType
class ColorType {
<<enumeration>>
Yellow
Green
Purple
Red
Orange
Blue
Gray
Light
}
class Names {
- static String[] names
+ getRandom(): String
}
class Player {
- String fullName
- String firstName
- ColorType color
- AvatarType avatar
- boolean isComputer
+ generateCharacter()
+ getAllTerritories()
}