@startuml

set namespaceSeparator ::


namespace shape {
    abstract Shape #lightgray
    class Center #lightgray
    class Angle #lightgray
}


namespace model {
    class WorldStamp {
        + id
        
        + namespace
    }

    abstract AbstractModel {
        + collides_with(model)
        + collides_with(shape)
        + would_collide(model)
        + add_shape(...)
        + get_shape_ptrs()
        + set_center(...)
        + set_angle(...)
    }
    
    abstract AbstractWorld {
        + add_model(...)
        + remove_model(...)
        
    }
    
    class ObservingWorld <<Observer, Notifier>> {
        + on_notification(...)
    }

    class NotifyingModel <<Observer, Notifier>> {
        + notify_about_created()
        + notify_about_deleted()
        + notify_about_updated()
    }

    class Robot {
        + <u>spawn(...)</u>
    }

    class Wall {
        + <u>spawn(...)</u>
    }

    AbstractModel -|> WorldStamp

    AbstractModel <|-- NotifyingModel
    ObservingWorld "1" <- "*" NotifyingModel
    AbstractWorld "1" -> "*" AbstractModel
    AbstractWorld <|-- ObservingWorld
    
    NotifyingModel <|- Model
    Model <|-- Robot
    Model <|-- Wall
    ObservingWorld <|-- World
    NotifyingModel <-- World
}

shape::Shape "*" <-- "1" model::AbstractModel
shape::Angle "1" <-- "1" model::AbstractModel
shape::Center "1" <-- "1" model::AbstractModel

@enduml
