private void gameLoop() {
        isLooping = true;
        long currentTime;

        gui.update(System.currentTimeMillis());

        while (isLooping) {
            currentTime = System.currentTimeMillis();

            if (Dealer.isDealing()) {
                Dealer.continueDealing(currentTime);
            }
            else if (currentPlayer != null && !playPaused) {
                currentPlayer.play(currentTime);
            }

            gui.update(currentTime);
            gui.draw();

            Thread.yield();
        }
    }