Update Class Diagram authored by Kovács Gergely Zsolt's avatar Kovács Gergely Zsolt
...@@ -39,13 +39,13 @@ package Model.Common { ...@@ -39,13 +39,13 @@ package Model.Common {
+ GetActions() : IEnumerable<Action> + GetActions() : IEnumerable<Action>
} }
class Singleton<T> { class Singleton<T> <<Singleton>> {
- {static} instance : T - {static} instance : T
- Singleton() - Singleton()
+ {static} GetInstance() : T + {static} GetInstance() : T
} }
class Simulation { class Simulation <<Singleton>> {
- people : Person[] - people : Person[]
- Simulation() - Simulation()
} }
...@@ -53,7 +53,7 @@ package Model.Common { ...@@ -53,7 +53,7 @@ package Model.Common {
Simulation --> Park Simulation --> Park
Simulation --> MaintenanceDispatcher Simulation --> MaintenanceDispatcher
class Park { class Park <<Singleton>> {
- balance : int - balance : int
- entryFee : int - entryFee : int
- buildings : Building[] - buildings : Building[]
...@@ -62,6 +62,8 @@ package Model.Common { ...@@ -62,6 +62,8 @@ package Model.Common {
+ GetEntryFee() : int + GetEntryFee() : int
+ GetBuildings() : Building[] + GetBuildings() : Building[]
+ GetEntrance() : Building + GetEntrance() : Building
+ GetProperties() : IEnumerable<Property> {override}
+ GetActions() : IEnumerable<Action> {override}
+ ModifyBalance(int) + ModifyBalance(int)
+ AddBuilding(Building) + AddBuilding(Building)
+ SetEntryFee(int) + SetEntryFee(int)
...@@ -80,12 +82,11 @@ package Model.Common { ...@@ -80,12 +82,11 @@ package Model.Common {
} }
WorldEntity --|> IDisplayable WorldEntity --|> IDisplayable
class MaintenanceDispatcher { class MaintenanceDispatcher <<static>> {
- maintainers : MaintenanceGuy[] - {static} maintainers : MaintenanceGuy[]
- MaintenanceDispatcher() - MaintenanceDispatcher()
+ {static} GameBroken(Building) + {static} GameBroken(Building)
} }
MaintenanceDispatcher --|> Singleton
} }
package Model.Map { package Model.Map {
...@@ -168,7 +169,8 @@ package Model.People { ...@@ -168,7 +169,8 @@ package Model.People {
- name : string - name : string
# Person(Vector2, float) # Person(Vector2, float)
+ Tick() {override} + Tick() {override}
+ GetProperties() {override} + GetProperties() : IEnumerable<Property> {override}
+ GetActions() : IEnumerable<Action> {override}
+ GetDestination() + GetDestination()
+ SetDestination(MapObject) + SetDestination(MapObject)
} }
...@@ -183,7 +185,7 @@ package Model.People { ...@@ -183,7 +185,7 @@ package Model.People {
+ DeliverEffects(int, int, int) + DeliverEffects(int, int, int)
+ GameEnded(Vector2) + GameEnded(Vector2)
+ Tick() {override} + Tick() {override}
+ GetProperties() {override} + GetProperties() : IEnumerable<Property> {override}
+ ModifyMood(int) + ModifyMood(int)
+ ModifySatiety(int) + ModifySatiety(int)
+ ModifyMoney(int) + ModifyMoney(int)
...@@ -195,7 +197,7 @@ package Model.People { ...@@ -195,7 +197,7 @@ package Model.People {
- idle : bool - idle : bool
# Staff(Vector2, float) # Staff(Vector2, float)
+ Tick() {override} + Tick() {override}
+ GetProperties() {override} + GetProperties() : IEnumerable<Property> {override}
+ IsIdle() : bool + IsIdle() : bool
+ SetDestination(MapObject) {override} + SetDestination(MapObject) {override}
} }
...@@ -204,14 +206,14 @@ package Model.People { ...@@ -204,14 +206,14 @@ package Model.People {
class CleaningLady { class CleaningLady {
+ CleaningLady(Vector2, float) + CleaningLady(Vector2, float)
+ Tick() {override} + Tick() {override}
+ GetProperties() {override} + GetProperties() : IEnumerable<Property> {override}
} }
CleaningLady --|> Staff CleaningLady --|> Staff
class MaintenanceGuy { class MaintenanceGuy {
+ MaintenanceGuy(Vector2, float) + MaintenanceGuy(Vector2, float)
+ Tick() {override} + Tick() {override}
+ GetProperties() {override} + GetProperties() : IEnumerable<Property> {override}
} }
MaintenanceGuy --|> Staff MaintenanceGuy --|> Staff
MaintenanceDispatcher *--- "-maintainers\n*\n" MaintenanceGuy MaintenanceDispatcher *--- "-maintainers\n*\n" MaintenanceGuy
... ...
......