dependency injection of the canvas on the spaceship constructor