public static void main(String[] args) {
        init();
        update(chess.getUserColor());
        while (!chess.isCheckmate()) {
            try {
            semaphore.acquire();
            ChessPiece chosen = chessBoard.get(myXCoor, myYCoor);
            buttons[myYCoor][myXCoor].setBackground(Color.green);
            System.out.println(chessBoard.toString());
            for (int i = 0;i < 8;i++) {
                for (int u = 0;u < 8;u++) {
                    if (chess.validMove(myXCoor, myYCoor, i, u, chess.getUserColor(), false)) {
                        if (chessBoard.get(i, u) == null) {
                            buttons[u][i].setBackground(Color.yellow);    
                        }
                        else {
                            buttons[u][i].setBackground(Color.red);    
                        }
                    }
                }    
            }
            semaphore.acquire();
            } catch (InterruptedException e) {
                System.err.println(e.getMessage());
            }
            firstChoice = false;
            secondChoice = false;
            System.out.println(chessBoard.toString());
            chess.gfxPlayRound(myXCoor, myYCoor, targXCoor, targYCoor);
            panel.removeAll();
            update(chess.getUserColor());
            panel.updateUI();
        }
        String congrats = "Game Over! -- " + (chess.getUserColor().equals("W") ? "Black" : "White") + " wins!";
        System.out.println(congrats);
        frame.setTitle(congrats);
        for (JButton[] ba : buttons) {
            for (JButton b : ba) {
                b.setBackground(Color.red);
            }
        }
    }