Added Model.People package to Class Diagram authored by Kovács Gergely Zsolt's avatar Kovács Gergely Zsolt
......@@ -19,9 +19,56 @@ package Model.Common {
}
class Singleton {
- {static} instance : Singleton
- {static} instance : T
- Singleton()
+ {static} GetInstance() : Singleton
+ {static} GetInstance() : T
}
Singleton <|-- Simulation
class Simulation {
- people : Person[]
- Simulation()
}
Simulation --> Park
Singleton <|-- Park
IInspectable <|-- Park
class Park {
- balance : int
- entryFee : int
- buildings : Building[]
- Park()
+ GetBalance() : int
+ GetEntryFee() : int
+ GetBuildings() : Building[]
+ ModifyBalance(int)
+ AddBuilding(Building)
+ SetEntryFee(int)
}
IDisplayable <|-- WorldEntity
class WorldEntity {
- position : Vector2
- visible : bool
# WorldEntity(Vector2)
+ GetPosition() : Vector2
+ GetVisible() : bool
+ SetPosition(Vector2)
+ SetVisible(bool)
}
Singleton <|-- MaintenanceDispatcher
Simulation ---> MaintenanceDispatcher
class MaintenanceDispatcher {
- maintainers : MaintenanceGuy[]
- MaintenanceDispatcher()
+ {static} GameBroken(Building)
}
}
......@@ -42,6 +89,7 @@ package Model.Nav {
}
package Model.Map {
WorldEntity <|-- MapObject
abstract class MapObject {
+ Enter(Person) : Vector2? {abstract}
......@@ -49,7 +97,7 @@ package Model.Map {
}
class Cell {
}
Cell "1" *-- MapObject
Cell "{0,1}" *-- VertexHandle
......@@ -64,7 +112,10 @@ package Model.Map {
class Placement {
+ Pos : Vector2
}
Placement "1" *-- Orientation
Simulation "1" *- Map
class Map {
+ Map(Vector2)
......@@ -89,135 +140,85 @@ package Model.Map {
}
Singleton <|-- Simulation
class Simulation {
- people : Person[]
- Simulation()
}
Simulation --> Park
Singleton <|-- Park
IInspectable <|-- Park
class Park {
- balance : int
- entryFee : int
- buildings : Building[]
- Park()
+ GetBalance() : int
+ GetEntryFee() : int
+ GetBuildings() : Building[]
+ ModifyBalance(int)
+ AddBuilding(Building)
+ SetEntryFee(int)
}
IDisplayable <|-- WorldEntity
class WorldEntity {
- position : Vector2
- visible : bool
# WorldEntity(Vector2)
+ GetPosition() : Vector2
+ GetVisible() : bool
+ SetPosition(Vector2)
+ SetVisible(bool)
}
Simulation *-- "-people\n*" Person
IInspectable <|--- Person
ITickable <|--- Person
WorldEntity <|-- Person
class Person {
- destination : MapObject
- nextPosition : Vector2
- speed : float {readonly}
- pavement : Pavement
- routeHandle : RouteHandle
# Person(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
+ GetDestination()
+ SetDestination(MapObject)
}
Person <|-- Visitor
class Visitor {
- mood : int
- satiety : int
- money : int
- inQueue : bool
+ Visitor(Vector2, float, int, int, int)
- ChooseDestination()
+ DeliverEffects(int, int, int)
+ GameEnded(Vector2)
+ Tick() {override}
+ GetProperties() {override}
+ ModifyMood(int)
+ ModifySatiety(int)
+ ModifyMoney(int)
+ SetInQueue(bool)
}
package Model.People {
Simulation *-- "-people\n*" Person
IInspectable <|--- Person
ITickable <|--- Person
WorldEntity <|-- Person
class Person {
- destination : MapObject
- nextPosition : Vector2
- speed : float {readonly}
- pavement : Pavement
- routeHandle : RouteHandle
- name : string
# Person(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
+ GetDestination()
+ SetDestination(MapObject)
}
Person <|-- Staff
class Staff {
- idle : bool
# Staff(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
+ IsIdle() : bool
+ SetDestination(MapObject) {override}
}
Person <|-- Visitor
class Visitor {
- mood : int
- satiety : int
- money : int
- inQueue : bool
+ Visitor(Vector2, float, int, int, int)
- ChooseDestination()
+ DeliverEffects(int, int, int)
+ GameEnded(Vector2)
+ Tick() {override}
+ GetProperties() {override}
+ ModifyMood(int)
+ ModifySatiety(int)
+ ModifyMoney(int)
+ SetInQueue(bool)
}
Staff <|-- CleaningLady
Person <|-- Staff
class CleaningLady {
+ CleaningLady(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
}
class Staff {
- idle : bool
# Staff(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
+ IsIdle() : bool
+ SetDestination(MapObject) {override}
}
Staff <|-- MaintenanceGuy
Staff <|-- CleaningLady
class MaintenanceGuy {
+ MaintenanceGuy(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
}
class CleaningLady {
+ CleaningLady(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
}
Singleton <|-- MaintenanceDispatcher
Simulation ---> MaintenanceDispatcher
Staff <|-- MaintenanceGuy
MaintenanceDispatcher *-- "-maintainers\n*" MaintenanceGuy
class MaintenanceDispatcher {
- maintainers : MaintenanceGuy[]
- MaintenanceDispatcher()
+ {static} GameBroken(Building)
class MaintenanceGuy {
+ MaintenanceGuy(Vector2, float)
+ Tick() {override}
+ GetProperties() {override}
}
}
MaintenanceDispatcher *-- "-maintainers\n*" MaintenanceGuy
Simulation "1" *- Map
WorldEntity <|-- MapObject
package Model.Landscape {
package Blueprints {
abstract class ObjectBlueprint {
+ Size: Vector2
+ ConstructionCost : int
+ GetSize() : Vector2 {override}
+ CanPlace(Map, Placement) : bool {override}
}
......@@ -226,7 +227,7 @@ package Model.Landscape {
abstract class BuildingBlueprint {
+ MaintenanceCost: int
+ ConstructionTime: int
+ GetNavigableCells() : IEnumerable<NavigableCell> {override}
}
BuildingBlueprint --|> ObjectBlueprint
......@@ -249,7 +250,7 @@ package Model.Landscape {
+ ConstructionCost: int
+ MinVisitorCountToStart: int
+ TimePerRound: int
+ Place(Map, Placement) : MapObject {override}
}
VisitableBuildingBlueprint --|> BuildingBlueprint
......@@ -279,7 +280,7 @@ package Model.Landscape {
- MaintenanceCostPerVisitor: int
- MinVisitorCountToStart: int
- TimePerRound: int
+ Enter(Person) : Vector2? {override}
+ Exit(Person) {override}
}
......@@ -290,7 +291,7 @@ package Model.Landscape {
- garbageCount : int
- hasGarbageCan : bool
+ GetGarbage() : int
+ Enter(Person) : Vector2? {override}
+ Exit(Person) {override}
}
......
......