Changes
Page history
Update Class Diagram
authored
Mar 01, 2021
by
Pőcze Barnabás
Show whitespace changes
Inline
Side-by-side
Class-Diagram.md
View page @
2ae1c230
...
...
@@ -18,23 +18,19 @@ package Model.Common {
+ GetActions() : IEnumerable<Action>
}
class Singleton {
class Singleton
<T>
{
- {static} instance : T
- Singleton()
+ {static} GetInstance() : T
}
Singleton <|-- Simulation
class Simulation {
- people : Person[]
- Simulation()
}
Simulation --|> Singleton
Simulation --> Park
Singleton <|-- Park
IInspectable <|-- Park
Simulation ---> MaintenanceDispatcher
class Park {
- balance : int
...
...
@@ -48,8 +44,8 @@ package Model.Common {
+ AddBuilding(Building)
+ SetEntryFee(int)
}
IDisplayable <|-- WorldEntity
Park --|> Singleton
Park --|> IInspectable
class WorldEntity {
- position : Vector2
...
...
@@ -60,19 +56,18 @@ package Model.Common {
+ SetPosition(Vector2)
+ SetVisible(bool)
}
Singleton <|-- MaintenanceDispatcher
Simulation ---> MaintenanceDispatcher
WorldEntity --|> IDisplayable
class MaintenanceDispatcher {
- maintainers : MaintenanceGuy[]
- MaintenanceDispatcher()
+ {static} GameBroken(Building)
}
MaintenanceDispatcher --|> Singleton
}
package Model.Nav {
package Model.Map {
package Nav {
class NavigationGraph {
+ AddVertex() : VertexHandle
+ AddEdge(VertexHandle, VertexHandle)
...
...
@@ -88,19 +83,17 @@ package Model.Nav {
}
}
package Model.Map {
WorldEntity <|-- MapObject
abstract class MapObject {
+ Enter(Person) : Vector2? {abstract}
+ Exit(Person) {abstract}
}
MapObject --|> WorldEntity
class Cell {
}
Cell "1"
*--
MapObject
Cell "{0,1}"
*--
VertexHandle
Cell
*-
"1" MapObject
Cell
*--
"{0,1}" VertexHandle
enum Orientation {
NORTH
...
...
@@ -113,17 +106,16 @@ package Model.Map {
+ Pos : Vector2
}
Placement "1" *-- Orientation
Simulation "1" *- Map
Placement *- "1" Orientation
class Map {
+ Map(Vector2)
+ CanBuild(IMapObjectBlueprint) : bool
+ Build(IMapObjectBlueprint)
}
Map "*" *-- Cell
Map "1" *-- NavigationGraph
Map *- "*" Cell
Map *-- "1" NavigationGraph
Simulation *-- "1" Map
class NavigableCell {
+ Pos : Vector2
...
...
@@ -136,7 +128,6 @@ package Model.Map {
+ CanPlace(Map, Placement) : bool
+ Place(Map, Placement) : MapObject
}
}
...
...
@@ -160,9 +151,6 @@ package Model.People {
+ SetDestination(MapObject)
}
Person <|-- Visitor
class Visitor {
- mood : int
- satiety : int
...
...
@@ -179,9 +167,7 @@ package Model.People {
+ ModifyMoney(int)
+ SetInQueue(bool)
}
Person <|-- Staff
Visitor --|> Person
class Staff {
- idle : bool
...
...
@@ -191,25 +177,22 @@ package Model.People {
+ IsIdle() : bool
+ SetDestination(MapObject) {override}
}
Staff <|-- CleaningLady
Staff --|> Person
class CleaningLady {
+ CleaningLady(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
}
Staff <|-- MaintenanceGuy
MaintenanceDispatcher *-- "-maintainers\n*" MaintenanceGuy
CleaningLady --|> Staff
class MaintenanceGuy {
+ MaintenanceGuy(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
}
MaintenanceGuy --|> Staff
MaintenanceDispatcher *-- "-maintainers\n*" MaintenanceGuy
}
...
...
@@ -267,7 +250,7 @@ package Model.Landscape {
}
Building --|> MapObject
Building --|> ITickable
Building
"1" *--
BuildingState
Building
*-- "1"
BuildingState
class StaffBuilding {
...
...
...
...