package pp.monopoly.client.gui;

/**
 * Synchronizes the visual representation of the board with the game model.
 * Handles updates for items on the board.
 */
class MapViewSynchronizer extends BoardSynchronizer {
    private final MapView view;

    /**
     * Constructs a new MapViewSynchronizer for the given MapView.
     *
     * @param view the MapView to synchronize with the game model
     */
    public MapViewSynchronizer(MapView view) {
        super(view.getBoard(), view.getNode());
        this.view = view;
        addExisting();
    }

    /**
     * Enables the state by performing initial setup, such as adding any items to the view.
     */
    
    protected void enableState() {
        // Platz für zusätzliche Initialisierungen
    }

    /**
     * Disables the state by clearing the view.
     */
    
    protected void disableState() {
        view.getNode().detachAllChildren(); // Entfernt alle visuellen Elemente vom Knoten
    }
}
