text: const Engine = Matter.Engine;
  const World = Matter.World;
  const Bodies = Matter.Bodies;
  const Constraint = Matter.Constraint;
  var engine, world;
  var canvas, angle, tower, ground, cannon;
  
  
  
  
  function preload() {
    backgroundImg = loadImage("./assets/background.gif");
    towerImage = loadImage("./assets/tower.png");
  
  }
  
  function setup() {
    canvas = createCanvas(1200,600);
    engine = Engine.create();
    world = engine.world;
    tower = new Tower(150, 350, 160, 310);
    ground = new Ground()
    angle = -PI/4
    
    cannon = new Cannon(180,110,110,50,angle)
  
  }
  
  function draw() {
    background(189);
    image(backgroundImg, 0, 0, width, height);
    
    Engine.update(engine);
    ground.display();
    
    cannon.display()
    tower.display();
    
   
  }