Add TickResult authored by Karikó Csongor Csanád's avatar Karikó Csongor Csanád
...@@ -57,17 +57,29 @@ package Model.Common { ...@@ -57,17 +57,29 @@ package Model.Common {
- people : Person[] - people : Person[]
- map : Map - map : Map
- park : Park - park : Park
- currentTickResult : TickResult
- Simulation() - Simulation()
+ Create(SimulationConfig) + CreateOnce(SimulationConfig) {static}
+ GetMoney() : int
+ GetPark() : IInspectable + GetPark() : IInspectable
+ GetBuilder() : IBuilder + GetBuilder() : IBuilder
+ Tick() : IEnumerable<(IDisplayable, IInspectable)> + AddPerson(Person)
+ AddPerson(MaintenanceGuy)
+ AddPerson(CleaningLady)
+ Tick() : TickResult
} }
Simulation --|> Singleton Simulation --|> Singleton
Simulation --> Park Simulation --> Park
Simulation --> MaintenanceDispatcher Simulation --> MaintenanceDispatcher
Simulation *- TickResult
class TickResult {
+ GameOver : bool
+ {field} NewVisitors : IEnumerable<(IDisplayable, IInspectable)>
+ {field} NewCleaningStaff : IEnumerable<(IDisplayable, IInspectable)>
+ {field} NewMaintenanceStaff : IEnumerable<(IDisplayable, IInspectable)>
}
class Park <<Singleton>> { class Park <<Singleton>> {
- balance : int - balance : int
...@@ -341,18 +353,33 @@ package Model.Landscape { ...@@ -341,18 +353,33 @@ package Model.Landscape {
skinparam classAttributeIconSize 0 skinparam classAttributeIconSize 0
left to right direction left to right direction
class Model.TickResult {
+ GameOver : bool
+ {field} NewVisitors : IEnumerable<(IDisplayable, IInspectable)>
+ {field} NewCleaningStaff : IEnumerable<(IDisplayable, IInspectable)>
+ {field} NewMaintenanceStaff : IEnumerable<(IDisplayable, IInspectable)>
}
Model.Simulation *- Model.TickResult
class Model.Simulation { class Model.Simulation {
- people : Person[] - people : Person[]
- map : Map - map : Map
- park : Park - park : Park
- currentTickResult : TickResult
- Simulation() - Simulation()
+ Create(SimulationConfig) + CreateOnce(SimulationConfig) {static}
+ GetMoney() : int
+ GetPark() : IInspectable + GetPark() : IInspectable
+ GetBuilder() : IBuilder + GetBuilder() : IBuilder
+ Tick() : IEnumerable<(IDisplayable, IInspectable)> + AddPerson(Person)
+ AddPerson(MaintenanceGuy)
+ AddPerson(CleaningLady)
+ Tick() : TickResult
} }
interface Model.IBuilder { interface Model.IBuilder {
+ CanBuild(IMapObjectBlueprint, Orientation) : bool + CanBuild(IMapObjectBlueprint, Orientation) : bool
+ Build(IMapObjectBlueprint, Orientation) : (IDisplayable, IInspectable) + Build(IMapObjectBlueprint, Orientation) : (IDisplayable, IInspectable)
... ...
......