public Pong(String name) {
        super(name);
        setSize(SCREEN_DIMENSIONS);
        setResizable(false);
        setDefaultLookAndFeelDecorated(true);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setLocationRelativeTo(rootPane);
        setVisible(true);
        panel = (JPanel) getContentPane();
        panel.setPreferredSize(SCREEN_DIMENSIONS);
        panel.setLayout(null);
        canvas = new PongCanvas(this);
        panel.add(canvas);
        canvas.setupBufferStrategy();
        SpriteManager = new SpriteManager(this);
        SpriteManager.loadSprites();
        EntityManager = new EntityManager(this);
        CollisionManager = new CollisionManager(this);
        new Thread(canvas).start();
        new EntityPongBall(this, EntityType.BALL, SpriteManager.ball, SCREEN_DIMENSIONS.width / 2, SCREEN_DIMENSIONS.height / 2, new Vector(1f, 180));
        new EntityPlayerPaddle(this, EntityType.PLAYER, SpriteManager.paddle, 10, 0);
        canvas.addMouseMotionListener(new PongMouseListener(this));
        while (true) {
            for (Entity entity : EntityManager.getEntities()) {
                entity.onUpdate();
            }

            CollisionManager.processCollisions();

            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            }
        }
    }