public void paint() {
        BufferStrategy bs = getBufferStrategy();
        if (bs == null) {
            createBufferStrategy(3);
            return;
        }

        Graphics2D g = (Graphics2D) bs.getDrawGraphics();

        g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);
        g.clearRect(0, 0, getWidth(), getHeight());

        switch (state) {
            case MAIN_SCREEN:
                screen.render(g);
                break;
            case PLAYING:
                level.render(g);

                for (int i = 0; i < entities.size(); i++)
                    entities.get(i).render(g);
                break;
            case LOADING:
                screen.render(g);
                break;
            case COMPLETED:
                screen.render(g);
                break;
        }

        g.dispose();

        bs.show();
    }