package game.Map;

import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.image.Image;

public class CreateMap {
    private Canvas canvas;
    private GraphicsContext graphicsContext;
    private Image background;
    private Image map;

    public Image getMap() {
        return this.map;
    }

    public void setMap(Image map) {
        this.map = map;
    }

    public Image getBackground() {
        return this.background;
    }

    public void setBackground(Image background) {
        this.background = background;
    }

    public Canvas getCanvas() {
        return this.canvas;
    }

    public GraphicsContext getGraphicsContext() {
        return this.graphicsContext;
    }

    public void setGraphicsContext(GraphicsContext graphicsContext) {
        this.graphicsContext = graphicsContext;
    }

    public void setCanvas(Canvas canvas) {
        this.canvas = canvas;
    }

    public CreateMap(int with, int high, Image background, Image map) {
        this.setCanvas(new Canvas(with, high));
        this.setBackground(background);
        this.setMap(map);
        this.setGraphicsContext(this.getCanvas().getGraphicsContext2D());
        this.createMap();
    }

    private void createMap() {
        this.getGraphicsContext().drawImage(this.getBackground(), 0, 0);
        this.getGraphicsContext().drawImage(this.getMap(), 0, 0);
    }
}

@@ -1390,27 +1390,31 @@
 s.getMap(), 
+10
 0, 
+10
 0);%0A    %7D%0A%7D%0A

add map from x(100) and y(100)