Update Class Diagram authored by Pőcze Barnabás's avatar Pőcze Barnabás
......@@ -159,15 +159,20 @@ package Model.Map {
WEST
}
class Placement {
+ Position : Vector2
class MapPosition {
+ Coords : Vec2i
+ Orientation : Orientation
}
class MapObjectPosition {
+ MapPosition : MapPosition
+ WorldPosition : Vector2
}
class Map {
+ Map(Vector2)
+ CanBuild(IMapObjectBlueprint, Placement) : bool
+ Build(IMapObjectBlueprint, Placement): (IDisplayable, IInspectable)
+ Map(Vec2i, float)
+ CanBuild(IMapObjectBlueprint, MapPosition) : bool
+ Build(IMapObjectBlueprint, MapPosition): (IDisplayable, IInspectable)
}
Map *- "*" Cell
Map o-- "1" NavigationGraph
......@@ -175,15 +180,15 @@ package Model.Map {
IBuilder <|-- Map
class NavigableCell {
+ Pos : Vector2
+ Pos : Vec2i
+ OpenDirections: IEnumerable<Orientation>
}
interface IMapObjectBlueprint {
+ GetSize() : Vector2
+ GetSize() : Vec2i
+ GetNavigableCells() : IEnumerable<NavigableCell>
+ CanPlace(Map, Placement) : bool
+ Place(Map, Placement) : MapObject
+ CanPlace(Map, MapPosition) : bool
+ Place(Map, MapObjectPosition) : MapObject
}
}
......@@ -263,11 +268,11 @@ package Model.People {
package Model.Landscape {
package Blueprints {
abstract class ObjectBlueprint {
+ Size: Vector2
+ Size: Vec2i
+ ConstructionCost : int
+ GetSize() : Vector2 {override}
+ CanPlace(Map, Placement) : bool {override}
+ GetSize() : Vec2i {override}
+ CanPlace(Map, MapPosition) : bool {override}
}
ObjectBlueprint --|> IMapObjectBlueprint
......@@ -280,19 +285,19 @@ package Model.Landscape {
BuildingBlueprint --|> ObjectBlueprint
class PavementBlueprint {
+ Place(Map, Placement) : MapObject {override}
+ Place(Map, MapObjectPosition) : MapObject {override}
}
PavementBlueprint --|> ObjectBlueprint
class QueuePavementBlueprint {
- capacity : int
+ Place(Map, Placement) : MapObject {override}
+ Place(Map, MapObjectPosition) : MapObject {override}
}
QueuePavementBlueprint --|> PavementBlueprint
class StaffBuildingBlueprint {
+ SpawnedStaffCount: int
+ Place(Map, Placement) : MapObject {override}
+ Place(Map, MapObjectPosition) : MapObject {override}
}
StaffBuildingBlueprint --|> BuildingBlueprint
......@@ -317,7 +322,7 @@ package Model.Landscape {
+ EffectOnVisitor : VisitorEffect
+ RepairCost: int
+ Place(Map, Placement) : MapObject {override}
+ Place(Map, MapObjectPosition) : MapObject {override}
}
VisitableBuildingBlueprint --|> BuildingBlueprint
}
......
......